I have a form that lists customer’s names and addresses in a grid. I can highlight a particular row, press a button on the form and another form opens up displaying a lot more details about that customer. Both the first form (with the button) and the second (with the details) are based on the same table. The macro which achieves this and is attached to the first form is based on Ratslinger’s solution to my question “what code do I need in a Base macro to access a field in highlighted row in a datasheet” from Oct. 14 2016. His solution captures the primary key associated with the customer highlighted in the first form and uses it to display in the second form the data relevant to that customer.
I am now struggling with writing a second macro which would be attached to a second button on the first form and would cause the second form to be opened (irrespective of which row is highlighted in the first form) at a new record. I could then enter details about a new customer on this second table and when this second form is closed this data would be stored in the table (and be displayed in the list of the customer names and addresses in the grid of the first form).
Basically I want a macro that opens up a new/clean record in second form in which data can be entered and which automatically stores the autovalue of the new primary key number for the table. The nearest reference to this problem I have found on the internet is Creating macros in Base (View topic) • Apache OpenOffice Community Forum. But it has so far not helped me. If anyone in the the community can help me I would be most grateful.