Auto Poulate A Field On A Continuous Form

Tiffosi2006

Registered User.
Local time
Today, 16:19
Joined
Nov 7, 2006
Messages
15
I have two forms (made from two tables)

The tables are tblplans and tblplancontrol. tblplancontrol is the many end and
the foreign key is 'PlanID'

The first form that you open is the plans form. Here you complete data about the plan, i.e planID (which is unique as its the name of the plan), author and date. From here you then open the plancontrol form which is a continous form. You can select which people you want to recieve a copy of the form - the link back is the plan id.

What i want to do is make sure that each time you start a new record that the planid is automatically populated from the still open plans form.

I assume this is done through code but cant quite get the right one. It must be done before i finish each record otherwsie i will get an error.

Any help is much appreciated.

Thanks

Kevin
 
You can set the default value of the PlanID on the subform to the value on the first form. To make sure users can't mess it up, make the second form Modal (on the 'other' tab of the form properties, set Modal to 'Yes'). You can set the second form to only show the records from the first form's planID by referencing it in the source query.
The code for both is similar:
=Forms!plancontrolform!PlanID
 
Thanks Jonathon,

Worked A Treat!
 

Users who are viewing this thread

Back
Top Bottom