To open a form of a specific record

annliang

New member
Local time
Today, 08:32
Joined
Dec 19, 2013
Messages
8
Currently,

1. I have created a button in a switchboard with embedded macro:-
Close Window
OpenForm (Form name: frmCustomerFind)

2. I have created a form "frmCustomerFind), in which I can select a customer name in a combo box named "CustomerName".
a. The row source: SELECT [tblCustomer].[CustomerID],[tblCustomer].
[CustomerName] FROM tblCustomer ORDER BY [CustomerName];
b. After Update Macro:
Open Form (Form name: frmCustomer)
SearchForRecord (Object Type: Form Object Name: frmCustomer
Record: First Where Condition = "[CustomerID]=" & Me.CustomerID

At the end, the form "frmCustomer" does open but not go to the record I want. It goes to the first record instead. (The frmCustomer has the "CustomerID" and "CustomerName" fields).

How can I fix this problem?
 

Users who are viewing this thread

Back
Top Bottom