S
shoa
Hello all
I created a simple table of Customers with three fieds: Customer ID (primary
key), name and address. I have some records in that table.
Now I have to create a Form to view each record or add more records.
Both of these tasks are simple
Now in this Form, I insert a Combo Box. The purpose of this box, is that
when I enter Customer ID (or select) in this Combo Box, the details of that
customer will be shown in the Form.
I use a Combo Box wizard to do this task. and choose the option 3: Find a
record on my form based on the value I selected in my combo box. Then I
select a field: Customer ID and so on. All those steps are OK.
However, when I enter (or select) a value of Customer ID on this Combo Box,
there are error presented in Visual Basic Window as the following:
-------------------------------------------------
Private Sub Combo1_AfterUpdate()
' Find the record that matches the control.
Dim rs as Object // ----Error in this line
Set rs = Me.Recordset.Clone
rs.FindFirst "[Customer ID] = " & Str(Me![Combo1])
Me.Bookmark = rs.Bookmark
End Sub
-------------------------------------------------
I do not know why as I did all steps by using Wizard !!!
Could you please help, thank you very much
S.Hoa
I created a simple table of Customers with three fieds: Customer ID (primary
key), name and address. I have some records in that table.
Now I have to create a Form to view each record or add more records.
Both of these tasks are simple
Now in this Form, I insert a Combo Box. The purpose of this box, is that
when I enter Customer ID (or select) in this Combo Box, the details of that
customer will be shown in the Form.
I use a Combo Box wizard to do this task. and choose the option 3: Find a
record on my form based on the value I selected in my combo box. Then I
select a field: Customer ID and so on. All those steps are OK.
However, when I enter (or select) a value of Customer ID on this Combo Box,
there are error presented in Visual Basic Window as the following:
-------------------------------------------------
Private Sub Combo1_AfterUpdate()
' Find the record that matches the control.
Dim rs as Object // ----Error in this line
Set rs = Me.Recordset.Clone
rs.FindFirst "[Customer ID] = " & Str(Me![Combo1])
Me.Bookmark = rs.Bookmark
End Sub
-------------------------------------------------
I do not know why as I did all steps by using Wizard !!!
Could you please help, thank you very much
S.Hoa