J
JBA
I'm trying to requery a form without success.
I seek to open Form1 in an autoexec macro to an empty record. Then the user
will open a dialog box, enter a name in a text box and click an OK button.
The dialog will close and the selected record will appear in Form1.
Currently, Form1 is based on Query1. The autoexec macro opens Form1 setting
Field1 in the underlying query to a blank record with the code [Field1]="".
In the dialog box, I plan to attach VBA to the OK button. The VBA will
requery Form1 and contain an SQL Where statement that sets Field1 to the
contents of the text box in the dialog. I have two questions.
How do I add an SQL Where statement to the Requery vba code.
Is there a simpler way to select a record to display in Form1. I can put a
reference to the text box as a criteria in Query1 but then I'm unable to open
the form to a blank record in the autoexec macro.
Thanks.
Jim
I seek to open Form1 in an autoexec macro to an empty record. Then the user
will open a dialog box, enter a name in a text box and click an OK button.
The dialog will close and the selected record will appear in Form1.
Currently, Form1 is based on Query1. The autoexec macro opens Form1 setting
Field1 in the underlying query to a blank record with the code [Field1]="".
In the dialog box, I plan to attach VBA to the OK button. The VBA will
requery Form1 and contain an SQL Where statement that sets Field1 to the
contents of the text box in the dialog. I have two questions.
How do I add an SQL Where statement to the Requery vba code.
Is there a simpler way to select a record to display in Form1. I can put a
reference to the text box as a criteria in Query1 but then I'm unable to open
the form to a blank record in the autoexec macro.
Thanks.
Jim