Hi.
Lets start from the begining... I have a table (TblA). I have 2 queries, QryA and QryB both using TblA (QryB also uses other tables). Each of the queries are used in seperate forms (FrmA from QryA and FrmB from QryB).
FrmB has a button which has the following code attached:
Dim IntMax As Integer
Dim StrOpen As String
IntMax = DMax("ANo", "TblA")
StrOpen = "[BNo]=" & IntMax
DoCmd.Close acForm, "FrmB"
DoCmd.OpenForm "FrmA", , , StrOpen
But when i press the button it comes up with an error:
"The table 'TblA' is aalready opened exclusively by another user, or it is already open through the user interface and can not be manipulated programmatically"
Any idea how I can get around this? Or why it might be happening?
Thank you!
Lets start from the begining... I have a table (TblA). I have 2 queries, QryA and QryB both using TblA (QryB also uses other tables). Each of the queries are used in seperate forms (FrmA from QryA and FrmB from QryB).
FrmB has a button which has the following code attached:
Dim IntMax As Integer
Dim StrOpen As String
IntMax = DMax("ANo", "TblA")
StrOpen = "[BNo]=" & IntMax
DoCmd.Close acForm, "FrmB"
DoCmd.OpenForm "FrmA", , , StrOpen
But when i press the button it comes up with an error:
"The table 'TblA' is aalready opened exclusively by another user, or it is already open through the user interface and can not be manipulated programmatically"
Any idea how I can get around this? Or why it might be happening?
Thank you!