Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Relating forms

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0


I have a form displaying info relating to each customer, each time the customer rings, I'd like to create an incident and record this.
So for instance I 'd like to create a button that when on client 1, opens all the incidents relating to client 1, etc.
Is this possible?
 
Presumably you've established a one-to-many relationship between your table containing the customer info (one side) and a table containing the incident records. The tables should be related by a primary key in the one side table (a value that is unique to each customer) and a matching value (foreign key) in each row in the incidents table relating to that customer.

If this is the case, the easiest way to display this information is using a subform to display the incidents for each customer, instead of using a button to open a separate form. To do this, create a second form containing the incident information and drag that form onto a blank area of your main form.

The open the subform properties after selecting the entire subform and make sure that the Child and Master linkings are set to your primary and foreign keys.

When set up properly, all the incidents for each customer will be display in the the subform. You can set the subform property to continuous forms to give you a subform that allows you to scroll thru all the records relating to the customer. - - - -

Bry
 
If you use a continuous subform based on a query linking the two tables together, then the system will automatically keep them in sync for you. Make sure that you include the primary key (eg customerID) on the subform so that it automatically updates as you move through the primary form.
 
You can take this a stage further by putting a button on the continuous form to view just 'that incident' in more detail.

And also put a button on the main form to add NEW incidents, relative to a particular customer.

I've knocked up a small database showing these features which you can look at if you wish. Post your email address and I'll send it.

cheers,
gary
 
Hello Gary,

Thanks for your helpfulness to Carri. I would appreciate seeing your example as well. Thanks for your help.

SBendBuckeye
landgwiney@characterlink.net
 
As to the 'syncing' . . . the subform does not have based upon a query linking the two tables. A query returning just the rows you want on your subform from the 'many' side will suffice. The 'syncing' is accomplished through specifying the primary and foreign key in the master/child linkings. - - - -

Bry
 
Have sent d/b to SBendBuckeye, if JohnHarkins is interested post email address.
 
Thanks a million everyone!:)

Gary, my address is "mimi-zenado@hotmail.com"!

Thanks again,
 
Gary,

Would like to see those examples as well.
david.bourdeau@bourdeauent.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top