SpandexBobcat
Technical User
Hi folks,
I am trying to use a combobox as a simple search on a field to bring up a record on the current form. I have done it before but for some reason I am getting a 'The value you entered isn't valid for this field' and I can't figure out why...
I have a form based on a single table, the combobox code is as follows:
The combobox is unbound with a row source of
One thing that I have done is assign a custom format to the field 'Job_Ref' as "REW"0000#. Field Job_Ref is an autonumber...
Can you see where I am going wrong? Or could you provide an alternative?
Thanks in advance,
SB
"If at first you don't succeed, destroy all evidence that you tried.
I am trying to use a combobox as a simple search on a field to bring up a record on the current form. I have done it before but for some reason I am getting a 'The value you entered isn't valid for this field' and I can't figure out why...
I have a form based on a single table, the combobox code is as follows:
Code:
Private Sub CmbSearch_AfterUpdate()
' Find the record that matches the control.
Dim rs As String
Set rs = Me.Recordset.Clone
rs.FindFirst "[Job_Ref] = '" & Me![CmbSearch] & "'"
Me.Bookmark = rs.Bookmark
End Sub
The combobox is unbound with a row source of
Code:
SELECT [qrySearch].[Job_Ref] FROM qrySearch;
One thing that I have done is assign a custom format to the field 'Job_Ref' as "REW"0000#. Field Job_Ref is an autonumber...
Can you see where I am going wrong? Or could you provide an alternative?
Thanks in advance,
SB
"If at first you don't succeed, destroy all evidence that you tried.