If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
two tables into a form
I have two tables...
Table 1 = tblClient cClientID AutoNumber PK cFirstName cLastName (+ plus pther dempgraphic info) Table 2 = tblClientWorkout cwClientWorkoutID AutoNumber PK cw_cClientID (plus other info) I have a form based on the tblClient with a command button that is labeled "Create Workout" that I want to open a form based on the tblClientWorkout. I want the frm_tblClientWorkout to be connected to that particular clients name. How do I do this? On the frm_tblClientWork i want the name of the client at the top(header) of the form. Then the information on body I will have multiple exercises but all associated with that same client. then I will create a report from that form to print. I hope I make sense...I am close but can't seem to get my client name to be associated with this form. Thanks! |
#2
|
|||
|
|||
two tables into a form
On Sun, 7 Jun 2009 19:24:01 -0700, LTOSH
wrote: I have two tables... Table 1 = tblClient cClientID AutoNumber PK cFirstName cLastName (+ plus pther dempgraphic info) Table 2 = tblClientWorkout cwClientWorkoutID AutoNumber PK cw_cClientID (plus other info) I have a form based on the tblClient with a command button that is labeled "Create Workout" that I want to open a form based on the tblClientWorkout. I want the frm_tblClientWorkout to be connected to that particular clients name. How do I do this? On the frm_tblClientWork i want the name of the client at the top(header) of the form. Then the information on body I will have multiple exercises but all associated with that same client. then I will create a report from that form to print. I hope I make sense...I am close but can't seem to get my client name to be associated with this form. Don't associate the *NAME*. Associate the ClientID instead. Use a Form based on tblClient, with a Subform based on tblClientWorkOut. Use cClientID as the Master Link Field and cw_cClientID (which I presume is a Long INteger foreign key linked to cClientID) as the Child Link Field. The "header" you describe would be the form itself; the "body" would be the subform. Your Report would not be based on the form, but on a query joining the two tables. You could use the report's Sorting and Grouping feature to display client information in a group header (grouping by client ID and/or client name) and the workout information in the report's Detail section. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|