Run-time error '3077': Syntax error (missing operator) in expression.

S

Shaun

I keep getting this error message. I suspect it has something to do
with apostrophes. I have a list box that lists all of Standard Subject
Identification Codes (SSIC). When a line is double clicked or the show
record command button is clicked a form is supposed to pop up that has
a SSIC_Name and SSIC_ID Fields along with a subform that lists all the
documents under each SSIC name/ID fields.

Private Sub cmdShowRecord_Click()
'Find the selected record, then close the dialog box.

Dim rst As DAO.Recordset
DoCmd.OpenForm "List of documents under every SSIC Code"
'Store the recordset for the List of documents under every SSIC Code
form.
Set rst = Forms![List of documents under every SSIC
Code].RecordsetClone

'Locate the record for the selected subscriber.
rst.FindFirst "SSIC_ID =" & List0

'Set the form's Bookmark property to move to the record.
Forms![List of documents under every SSIC Code].Bookmark =
rst.Bookmark

'Close the dialog box.
DoCmd.Close acForm, "GoToRecordDialog1"
End Sub

Private Sub List0_AfterUpdate()
'Once a record is chosen in the list, enable the cmdShowRecord button.
cmdShowRecord.Enabled = True
End Sub

Private Sub List0_DblClick(Cancel As Integer)
'When the user double-clicks, act as though
'the ShowRecord button was chosen.
If Not IsNull(List0) Then
cmdShowRecord_Click
End If
End Sub
Private Sub Cancel_Click()
On Error GoTo Err_Cancel_Click


DoCmd.Close

Exit_Cancel_Click:
Exit Sub

Err_Cancel_Click:
MsgBox Err.Description
Resume Exit_Cancel_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top