Linked forms & Controls

tbaxter

In Over My Head!
Local time
Today, 19:25
Joined
Jul 19, 2000
Messages
69
Hi all,

I have an application I'm working on with separate tables for clientiand policies. The policy table is linked back to the client table via clientid (one client to many policies). The client info comes up in one form and the user can then click on a command button to open the linked form to view/add policies owned by that client.

When inputting a new client in the "Add" form, I need the clientid field from the client form to automatically fill in the clientid field in the policy form when the policy form is opened.

BTW, this is yet another school project. I have to do the presentation for it on Monday night. As it stands now, the user would have to manually input the client id in the linked policy form. I've tried a couple of things and nothing has worked. Any help would be appreciated!

Tina
 
on the beforeInsert event of the policy form use:
Me!clientID=forms!clientform!ClientID
 
Thanks for the response -- unfortunately, it's not working!

I put the expression in the Before Update of the PolicyForm form properties.

Is it because I'm using a linked form instead of a sub-form, maybe?
 
Hi TBaxter

Why not put:

=forms!frmclient!ClientID

in the Default and Validation Rule properties for the foreign key - ClientID - on the second form that is opened up by the command button.

HTH

Rich Gorvin
 
Actually, it worked when I put the following in the default value of the ClientID properties on the Policy Form

=[Forms]![Add/Edit Client Form]![ClientID]

Thanks for the assistance!
 

Users who are viewing this thread

Back
Top Bottom