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
|
|||
|
|||
Getting related forms to work
I have two two tables: CLIENTS and VISITS.
CLIENTS contains client contact info. Key field is ClientID. VISITS contains information about meetings I have with clients. Each meeting gets one record. Key field in ClientDetailsID. It has a ClientID field, by which it is related to CLIENTS in a one (CLIENTS) to many (VISITS) relationship. I created a form for each of these tables. My problem: How can I get each new record I make in the VISITS table to automatically pick up the ClientID from the CLIENTS table? I've tried many ways of doing this with no luck and it's driving me batty because I know this should be easy. Can anyone explain the process clearly, or point me to someplace with instructions that are friendlier than Microsoft's? Any help would be greatly appreciated. Thanks in advance, Isidore |
#2
|
|||
|
|||
Getting related forms to work
Isabel -
Try building the form structure in a query and base your form off of that query instead of the tables. Link the two tables by the common field (ClientID?) and you should be ready to go. I have found that to be much easier, especially when I need to add another field down the road. Good Luck! -----Original Message----- I have two two tables: CLIENTS and VISITS. CLIENTS contains client contact info. Key field is ClientID. VISITS contains information about meetings I have with clients. Each meeting gets one record. Key field in ClientDetailsID. It has a ClientID field, by which it is related to CLIENTS in a one (CLIENTS) to many (VISITS) relationship. I created a form for each of these tables. My problem: How can I get each new record I make in the VISITS table to automatically pick up the ClientID from the CLIENTS table? I've tried many ways of doing this with no luck and it's driving me batty because I know this should be easy. Can anyone explain the process clearly, or point me to someplace with instructions that are friendlier than Microsoft's? Any help would be greatly appreciated. Thanks in advance, Isidore . |
#3
|
|||
|
|||
Getting related forms to work
Isidore wrote:
I have two two tables: CLIENTS and VISITS. CLIENTS contains client contact info. Key field is ClientID. VISITS contains information about meetings I have with clients. Each meeting gets one record. Key field in ClientDetailsID. It has a ClientID field, by which it is related to CLIENTS in a one (CLIENTS) to many (VISITS) relationship. I created a form for each of these tables. My problem: How can I get each new record I make in the VISITS table to automatically pick up the ClientID from the CLIENTS table? I've tried many ways of doing this with no luck and it's driving me batty because I know this should be easy. Can anyone explain the process clearly, or point me to someplace with instructions that are friendlier than Microsoft's? Any help would be greatly appreciated. Thanks in advance, Isidore The simplest way to do it is to use the Forms Wizard to create a form with a subform. Just tell it you want it to include both tblCLIENTS and tblVISITS in your form and, assuming the relationships are properly set, it will create the form for you automatically. Steve |
#4
|
|||
|
|||
Getting related forms to work
I have tried that, and apparently I'm doing something wrong. I put
all of the fields from both tables into the query and based both form on that. When I put those fields onto the forms, they have names like "tblclients.clientID" and "tblvisits.clientID". I assume "tblclients.clientID" goes on the Clients form and "tblvisits.clientID" goes on the Visitors form. Then, when I try to enter data, (a) the ID number doesn't appear, and (b) I get an error message that reads "The LinkMasterFields property setting has produced this error: "The object doesn't contain the Automation object "tblClients". This is totally meaningless to me. I'm obviously going about this the wrong way. Should I be basing my forms on 2 queries with fewer fields? How do you do it? Yikes! Thanks for the effort, Isidore On Fri, 14 May 2004 10:53:41 -0700, in microsoft.public.access.gettingstarted you wrote: Isabel - Try building the form structure in a query and base your form off of that query instead of the tables. Link the two tables by the common field (ClientID?) and you should be ready to go. I have found that to be much easier, especially when I need to add another field down the road. Good Luck! -----Original Message----- I have two two tables: CLIENTS and VISITS. CLIENTS contains client contact info. Key field is ClientID. VISITS contains information about meetings I have with clients. Each meeting gets one record. Key field in ClientDetailsID. It has a ClientID field, by which it is related to CLIENTS in a one (CLIENTS) to many (VISITS) relationship. I created a form for each of these tables. My problem: How can I get each new record I make in the VISITS table to automatically pick up the ClientID from the CLIENTS table? I've tried many ways of doing this with no luck and it's driving me batty because I know this should be easy. Can anyone explain the process clearly, or point me to someplace with instructions that are friendlier than Microsoft's? Any help would be greatly appreciated. Thanks in advance, Isidore . On Fri, 14 May 2004 10:53:41 -0700, wrote: Isabel - Try building the form structure in a query and base your form off of that query instead of the tables. Link the two tables by the common field (ClientID?) and you should be ready to go. I have found that to be much easier, especially when I need to add another field down the road. Good Luck! -----Original Message----- I have two two tables: CLIENTS and VISITS. CLIENTS contains client contact info. Key field is ClientID. VISITS contains information about meetings I have with clients. Each meeting gets one record. Key field in ClientDetailsID. It has a ClientID field, by which it is related to CLIENTS in a one (CLIENTS) to many (VISITS) relationship. I created a form for each of these tables. My problem: How can I get each new record I make in the VISITS table to automatically pick up the ClientID from the CLIENTS table? I've tried many ways of doing this with no luck and it's driving me batty because I know this should be easy. Can anyone explain the process clearly, or point me to someplace with instructions that are friendlier than Microsoft's? Any help would be greatly appreciated. Thanks in advance, Isidore . |
Thread Tools | |
Display Modes | |
|
|