VBA for tieing two

H

Haji

Hi,

I want to create a form called SelectCustomer that has a
combo box and a command button. The combo box
ComboSelectCustomer will be based on a query of customer
names. The command button CmdSubmitCustomer will be a
submit button. What I want to do is to then have this
form directed to another form called CustomerInformation
that has various text boxes of customer information on it
such as Name, Address, City, State Zip. This information
is based on A CustomerTable. I know there is some VB code
that I plug in somewhere but I forget what this is.

If anyone can help it would be appreciated.

Thanks,

Haji
 
M

Marshall Smith

If you created the button with the wizard, you should see a variable
"stLinkCriteria." If you set this variable equal to Me.ComboSelectCustomer,
then it will work.

Or, more generally, you want your OpenForm command to look like:

DoCmd.OpenForm "CustomerInformation", acNormal, ,"CustomerName = '" &
Me.ComboSelectCustomer & "'"

HTH,

Marshall Smith
Project Developers, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top