Dugantrain
I Love Pants
- Local time
- Today, 18:18
- Joined
- Mar 28, 2002
- Messages
- 221
I have a list box which is bound to a table. Column Count is 3, first column is a bound, invisible Autonum field. I have this code in order to find a record from the form's recordset.
Every time I double-click, however, I get the "Data Type Mismatch" error. I thought that maybe the list box was reading its autonum as text, so I tried to force the issue by using:
Still a mismatch. What's going on here?
Code:
Private Sub List_Inst_ID_DblClick(Cancel As Integer)
Dim rs As Object
Set rs = Me.RecordsetClone
rs.findfirst "[install_id]='" & me![list_Inst_ID] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Every time I double-click, however, I get the "Data Type Mismatch" error. I thought that maybe the list box was reading its autonum as text, so I tried to force the issue by using:
Code:
Private Sub List_Inst_ID_DblClick(Cancel As Integer)
Dim lstval As Long
lstval = Val(Me.List_Inst_ID)
Dim rs As Object
Set rs = Me.RecordsetClone
rs.findfirst "[install_id]='" & lstval & "'"
Me.Bookmark = rs.Bookmark
End Sub
Still a mismatch. What's going on here?
Last edited: