Command Button to open new customer record

JimmyG

Registered User.
Local time
Today, 06:35
Joined
Aug 3, 2004
Messages
37
In my database I have a Customer form and a Product form. The products are assigned to specific individual companies as each customer has their own exclusive range.

On the Customers form I have a command button which runs a macro to open the Products form. At present the form is opened as a new blank record, is it possible to have the macro fill in the customer name depending on which customers details are being displayed when the macro is run?

i.e. if customer B's details are on screen when the command button is pressed then the products form is opened with customer B's name already filled in.
 
You should have somewhere on the Products form, the CustomerID hidden (thats the autoNumber field allocated to the customer when registered) so you can add a TextBox to your Product form with the following in the ControlSource
Code:
=DLookUp("custname","tblcustomers","customerID = Forms!frmProducts!customerID")

Then the customer name will be shown.

Col
 

Users who are viewing this thread

Back
Top Bottom