Paul Archbold
New member
- Local time
- Yesterday, 20:55
- Joined
- Sep 19, 2019
- Messages
- 5
New Member! READ ME FIRST
Hi All
I have a make table and i would like to use this on two separate forms. the first form has a button that when pressed runs the make table query & then open a cross tab Form. on this Cross tab form i would like to run the make table query again, and then refresh the data on the form. Unfortunately i am getting an error message saying: "The database engine could not lock table "Data" because it is locked down by another person or process". my investigation and gut instinct is telling me that because the query is already being used by the first form it wont allow it to be used by the second. i am using VBA and the code on the second form is as follows:
FYI - the table is most definitely not being used by anyone else and the table is not open.
Any help would be much appreciated
Regards
Paul Archbold
Hi All
I have a make table and i would like to use this on two separate forms. the first form has a button that when pressed runs the make table query & then open a cross tab Form. on this Cross tab form i would like to run the make table query again, and then refresh the data on the form. Unfortunately i am getting an error message saying: "The database engine could not lock table "Data" because it is locked down by another person or process". my investigation and gut instinct is telling me that because the query is already being used by the first form it wont allow it to be used by the second. i am using VBA and the code on the second form is as follows:
Code:
Private Sub RefreshData_Earlies_Click()
DoCmd.SetWarnings False
On Error GoTo Err_RefreshData_Earlies_Click
DoCmd.Close acTable, "Data"
DoCmd.OpenQuery "qryFinalReport"
DoCmd.RunCommand acCmdRefresh
Exit_RefreshData_Earlies_Click:
Exit Sub
Err_RefreshData_Earlies_Click:
MsgBox Err.Description
Resume Exit_RefreshData_Earlies_Click
DoCmd.SetWarnings True
End Sub
Any help would be much appreciated
Regards
Paul Archbold
Last edited by a moderator: