D
Dirt Bike
So I have a table in a subform on a form. I knew I couldn't do anything with
the table straight away. So I wrote code to close the form. But I still get
the dreaded error about the inability to lock the table.
Here is my code: (please, don't laugh)
DoCmd.Close
MsgBox "OK, I had to close this form and pause just a second", vbOKOnly,
"That is a big 10-4 buddy!"
DoCmd.SetWarnings False
DoCmd.OpenQuery "QF-DG-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-JB-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-JS-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-MB-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-SC-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-SW-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-UN-BF", acViewNormal, acEdit
Beep
MsgBox "OK, built the new FORECAST form the existing sheets in
W:\OEM\forecast", vbOKOnly, "That is a big 10-4 buddy!"
stDocName = "Loc3Master"
DoCmd.OpenForm stDocName, , , stLinkCriteria
When I manully close the form and manually run the macro that builds the
table it works but the above code doesn't.
the table straight away. So I wrote code to close the form. But I still get
the dreaded error about the inability to lock the table.
Here is my code: (please, don't laugh)
DoCmd.Close
MsgBox "OK, I had to close this form and pause just a second", vbOKOnly,
"That is a big 10-4 buddy!"
DoCmd.SetWarnings False
DoCmd.OpenQuery "QF-DG-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-JB-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-JS-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-MB-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-SC-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-SW-BF", acViewNormal, acEdit
DoCmd.OpenQuery "QF-UN-BF", acViewNormal, acEdit
Beep
MsgBox "OK, built the new FORECAST form the existing sheets in
W:\OEM\forecast", vbOKOnly, "That is a big 10-4 buddy!"
stDocName = "Loc3Master"
DoCmd.OpenForm stDocName, , , stLinkCriteria
When I manully close the form and manually run the macro that builds the
table it works but the above code doesn't.