Carrying data forward from one form to another

J

Jazz

Hi

Small problem...i hope!

i have 2 forms called "CustomerDB" and "ProblemDB".
The "CustomerDB" holds data such as customer name, company
name, company address, company phone number and fax
number. The "ProblemDB" holds data telling me wot my
customers have had problems with regards to my system.

These forms have some fields which are the same, such as
customer name, customer number, serial number and so on.
Wot i wish to do is place a button on the customerDB form
called problems...once clicked it should open
the "ProblemDB" form and carry forward the appropriate
data...such as the customer name and woteva.

Any help wot so ever would be gratefully appreciated and
welcome with open arms. Thanks for taking time to read
this post

Jazz
 
D

Dan Artuso

Hi,
I'm going to assume there is a CustomerId in
CustomerDB's recordset and that you have that Id as
a foreign key in the table that feeds your ProblemDB form.

So in your button click you would have something like this:
DoCmd.OpenForm "ProblemDB",,,"yourCustIdField = " & Me.yourCustIdField

So just to be clear, the first yourCustIdField in the above statement is the
field in the ProblemDB form's recodset, and the Me.yourCustIdField is the
field in the CustomerDB form's recordset.

If your design is not setup like this, it should be.
 

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