OK..here is my dilema. I have a check box on my form that I am working with. I have written the code for it to perform the required function..the only problem is that it only does it the 3rd time I check the box. Here is what I need it to do...when I check the box to indicate a "yes", I need it to:
1. Move select data from "table 1" to "table 2" (done with an Append Query)
2. Delete that particular record in "table 1"(done with a Delete Query)
3. Open a new form for "table 2" and add more informationi.
here is the code I have plugged into the event procedure. Like I said...it works fine the 3rd time I check the box....just not the first two times I do it.
stDocName = "Update Inventory From Gen Info"
DoCmd.OpenQuery stDocName, acViewNormal, acEdit
stDocName = "Delete From Main After Inventory Update"
DoCmd.OpenQuery stDocName, acViewNormal, acEdit
DoCmd.OpenForm "Inventory"
Any ideas on what I need to do to make it work the first time I check the box instead of having to do check it multiple times.
1. Move select data from "table 1" to "table 2" (done with an Append Query)
2. Delete that particular record in "table 1"(done with a Delete Query)
3. Open a new form for "table 2" and add more informationi.
here is the code I have plugged into the event procedure. Like I said...it works fine the 3rd time I check the box....just not the first two times I do it.
stDocName = "Update Inventory From Gen Info"
DoCmd.OpenQuery stDocName, acViewNormal, acEdit
stDocName = "Delete From Main After Inventory Update"
DoCmd.OpenQuery stDocName, acViewNormal, acEdit
DoCmd.OpenForm "Inventory"
Any ideas on what I need to do to make it work the first time I check the box instead of having to do check it multiple times.