Strange Error: Run-Time 3707 Database Engine does not recognize name (1 Viewer)

cathie

Registered User.
Local time
Today, 04:43
Joined
Oct 21, 2017
Messages
10
I used this same exact code on a few other comboboxes with no problem... I can't understand why it's not working this time... I even changed the fieldname thinking it might be a keyword... MS help says it's probably misspelled but I copied it out of the table design...

Any idea what might be happening?

Code:
Private Sub Combo43_AfterUpdate() 
     
    Dim st As DAO.Recordset 
     
     
    If Not IsNull(Me.Combo43) Then 
         'Save before move.
        If Me.Dirty Then 
            Me.Dirty = False 
        End If 
         'Search in the clone set.
        Set st = Me.RecordsetClone 
        st.FindFirst "[MState] = " & Me.Combo43 
        If st.NoMatch Then 
            MsgBox "Not found: filtered?" 
        Else 
             'Display the found record in the form.
            Me.Bookmark = st.Bookmark 
        End If 
        Set st = Nothing 
    End If 
    Me.Combo43 = "" 
     
     
End Sub
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 01:43
Joined
Aug 30, 2003
Messages
36,132
What's the data type of the field? If it's text, it needs delimiters.
 

cathie

Registered User.
Local time
Today, 04:43
Joined
Oct 21, 2017
Messages
10
Brilliant! And I, sir, am a twit! Thank you for the speedy assist! :)
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 01:43
Joined
Aug 30, 2003
Messages
36,132
Happy to help!
 

Users who are viewing this thread

Top Bottom