Xtremlylost
Technical User
I am trying to open a new form (Claimfrm) and set two of the fields from the original form (Complaintfrm). I used the command button wizard and Access generated the following code: (Copied directly from the window)
Private Sub Command28_Click()
On Error GoTo Err_Command28_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Claimfrm"
stLinkCriteria = "[Claims.CarComplaintID]=" & Me![CarComplaintID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command28_Click:
Exit Sub
Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click
End Sub
The problem is I keep getting an error stating that I have "Invalid bracketing of '[Claims.CarComplaintID]. I haven't touched this code so I am wondering why Access generated code that would cause an error and if anyone sees any reason that this is not working.
Thanks in advance for any help.
Xtremelylost
Private Sub Command28_Click()
On Error GoTo Err_Command28_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Claimfrm"
stLinkCriteria = "[Claims.CarComplaintID]=" & Me![CarComplaintID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command28_Click:
Exit Sub
Err_Command28_Click:
MsgBox Err.Description
Resume Exit_Command28_Click
End Sub
The problem is I keep getting an error stating that I have "Invalid bracketing of '[Claims.CarComplaintID]. I haven't touched this code so I am wondering why Access generated code that would cause an error and if anyone sees any reason that this is not working.
Thanks in advance for any help.
Xtremelylost