Y
yachtfb
Private Sub Othercontacts_Click()
On Error GoTo Err_Othercontacts_Click
Dim stDocName As String
Hi there, can anyone help.
I have used the Control Wizard to create a button on a
form which opens a new form, but shows only records which
match a certain field.
Problem is that the wizard created code shows an error
that says there is a missing operator.
The code generated by the wizard is pasted below. I can't
find the error can you?
****************************
Dim stLinkCriteria As String
stDocName = "Contact Details"
stLinkCriteria = "[charityname]=" & Me![charityname]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Othercontacts_Click:
Exit Sub
Err_Othercontacts_Click:
MsgBox Err.Description
Resume Exit_Othercontacts_Click
End Sub
*****************************
On Error GoTo Err_Othercontacts_Click
Dim stDocName As String
Hi there, can anyone help.
I have used the Control Wizard to create a button on a
form which opens a new form, but shows only records which
match a certain field.
Problem is that the wizard created code shows an error
that says there is a missing operator.
The code generated by the wizard is pasted below. I can't
find the error can you?
****************************
Dim stLinkCriteria As String
stDocName = "Contact Details"
stLinkCriteria = "[charityname]=" & Me![charityname]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Othercontacts_Click:
Exit Sub
Err_Othercontacts_Click:
MsgBox Err.Description
Resume Exit_Othercontacts_Click
End Sub
*****************************