K
KSmith
I'm an old dBase programer that trying to help some folks write an inventory
control database.
I made one form that substracts inventory from one table and adds it to
another. When I copied this form to make another 'Move' screen I started
having trouble.
I copied Allen Browne's code from his help screen (listed below) and it
gives me this error message. Unknown or Invalied Field Reference Error 3345
cboMaterialLookup is a combo box that finds the data
RouterID is the field that FindFirst can't find! It's the Primary Key field
and AutoNumber field type.
I have tried several different ways of doing this and nothing seems to work,
the first form works find.
Sub cboMaterialLookUp_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.cboMaterialLookUp) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.Recordset.Clone
rs.FindFirst "[RouterID] = " & Me.cboMaterialLookUp
If rs.NoMatch Then
Msgbox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub
control database.
I made one form that substracts inventory from one table and adds it to
another. When I copied this form to make another 'Move' screen I started
having trouble.
I copied Allen Browne's code from his help screen (listed below) and it
gives me this error message. Unknown or Invalied Field Reference Error 3345
cboMaterialLookup is a combo box that finds the data
RouterID is the field that FindFirst can't find! It's the Primary Key field
and AutoNumber field type.
I have tried several different ways of doing this and nothing seems to work,
the first form works find.
Sub cboMaterialLookUp_AfterUpdate()
Dim rs As DAO.Recordset
If Not IsNull(Me.cboMaterialLookUp) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.Recordset.Clone
rs.FindFirst "[RouterID] = " & Me.cboMaterialLookUp
If rs.NoMatch Then
Msgbox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub