Carrying data to another form

  • Thread starter Thread starter Jazz
  • Start date Start date
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
 
This looks like a Form/Subform application. The customer is selected from
the Main form and the problems are then displayed in the Subform.
 
Jazz said:
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


Forms hold no data! The data is in your Tables somewhere behind your
forms. Your Forms are just windows onto the data in the Tables and you
may have a Query between the Table and the form to do some calculations
and/or sorting etc.

From what you say about your application, I would think it possible
that any one customer may have more than one problem. So I would have
two Tables; one for the Customer data (customer name, address etc.) and
one for the problem data (date, description, result etc.). In the
Customer Table I would have a unique primary key Field (autonumber) and
in the Problem Table I would have a foreign key field of long integer
type linked in a one-to-many relationship with that and having
referential integrity enabled as well as cascaded deletions.

Then I would set up a main form using the customer Table as its record
source. On that main Form I would set up a Subform with the problem
Table as its record source. In doing that I would set the Master/Child
link to use the key Field textboxes in the two forms, making those
textboxes invisible.

That should get you started!

By the way, avoid the use of reserved words such as 'name' and 'date'
etc., as Access will sulk and hide the ball if you do.

hth

Hugh
 
Back
Top