Hi,
I create this combo box but I keep getting error 3464 type mismatch. My code is below and would be grateful if anyone is able to point out the error.
Oh by the way and I am not sure if it makes a difference. I do have a subform on the form too.
Here is the lookup:
Row Source = Table/Query
After Update Event:
I create this combo box but I keep getting error 3464 type mismatch. My code is below and would be grateful if anyone is able to point out the error.
Oh by the way and I am not sure if it makes a difference. I do have a subform on the form too.
Here is the lookup:
Row Source = Table/Query
Code:
SELECT [tblsites].[sitesid], [sitesdescr] AS Site FROM tblsites ORDER BY [tblsites].[sitesdescr];
After Update Event:
Code:
Option Compare Database
Option Explicit
Private Sub cboFindRecord_AfterUpdate()
' Find the record that matches the control.
On Error GoTo ProcError
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[sitesid] = '" & Me![cboFindRecord] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
ExitProc:
Exit Sub
ProcError:
MsgBox "Error: " & err.Number & ". " & err.Description
Resume ExitProc
End Sub