Forum Discussion
help please
- Oct 18, 2022Change the form to design view. Select that control. Examine the Macro or VBA in that control's Events.
- George_HepworthOct 23, 2022Silver Contributor
I apologize for taking so long, longer than I anticipated.
The New Contact button has an embedded macro that runs when the user clicks the button. It looks like this:
Here are the actions that run in that macro:
The first line opens another form, called "Contact Details".
The Where condition tells the form to return only records where 1 = 0. Because that will always be false, the form will open with no existing records in it. It will only be available, therefore, to add a new contact record.
The Window Mode tells the form to open as a Dialog, or popup form.
The requery line updates the recordset in the calling form to show the newly added record. And the SearchForRecord section makes that newest record the current record, in the calling form.