I have a form with a linked subform - the tables have the same fields. The main form contains the daily records and the subform contains the history records.
I have a button does 3 things:
1: takes the daily record in the main form using an append query using the acct# and Plan Year fields and appends it to the history table \ subform.
2: Updates the daily table to put in "" in all the fields excep acct# and Plan year.
3: Refresh the main form \ subform.
Here is the code I am using: (Pretty basic stuff)
DoCmd.OpenQuery "Append OEK to OEK Orders"
DoCmd.OpenQuery "Update OEK after Append OEK Orders"
Forms![Open Enrollment Kits].Refresh
-However the first time I hit the button
it puts a blank record in the subform\history table
and does not do any of the above items
- If i hit the button a second time it then works.
What am i missing in the code or form setups?