jkfeagle
Codus Confusious
- Local time
- Today, 15:36
- Joined
- Aug 22, 2002
- Messages
- 166
I have two combo boxes, one on a main form and one on a subform. The two forms are not linked but are used to select to data records in two separate tables that you want linked. The linking is done by code behind a button. That works fine. What doesn't always work are the two combo boxes. The one on the main form works fine until I try to select the last entry in the list. Then I get the following error:
Run-Time Error '3077'"
Syntax error (missing operator) in expression
How could that be possible when it is working for the other records? Also the code was wizard generated. Here is the code:
Private Sub Combo12_AfterUpdate()
' Find the record that matches the control
Dim rs As Object
Set rs=Me.Recordset.Clone
rs.FindFirst "[ItemDescription] = '" & Me![Combo12] & "'"
Me.Bookmark = rs.Bookmark
End Sub
The second has exactly the same code but periodically gives me a different error:
'No records found'
This is really peculiar considering that the values are showing up in the combo box and when I check the table it is searching, the values are in fact there. I suspect that this may be a matter of resetting the pointer but I'm not sure. Anyone have any ideas??
Run-Time Error '3077'"
Syntax error (missing operator) in expression
How could that be possible when it is working for the other records? Also the code was wizard generated. Here is the code:
Private Sub Combo12_AfterUpdate()
' Find the record that matches the control
Dim rs As Object
Set rs=Me.Recordset.Clone
rs.FindFirst "[ItemDescription] = '" & Me![Combo12] & "'"
Me.Bookmark = rs.Bookmark
End Sub
The second has exactly the same code but periodically gives me a different error:
'No records found'
This is really peculiar considering that the values are showing up in the combo box and when I check the table it is searching, the values are in fact there. I suspect that this may be a matter of resetting the pointer but I'm not sure. Anyone have any ideas??