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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking fields

Status
Not open for further replies.

TheRiver

IS-IT--Management
Dec 18, 2003
121
GB
I have a main form with a command button which opens up another a sub form. The Employee ID links all the forms together, but how do I get it that when I input into the subform that the employee ID is automatically filled in?
 
The Easiest way I can think off is to use the OpenArgs to Pass the ID to the Subform and in the open Event on the subform have some code simular to the following

If Not IsNull(me.openargs) then
EmpID=me.OpenArgs
End If

This should work.
 
Hello,
if I unsderstand you right, you are trying to give the employee ID as a standard to other forms that you are opening with a cmdbutton. You can use ->
employee_ID = Forms("formname")![employee ID]

Hope this is what you were looking for

Mark
 
I dont really understand either of these.
 
Use your own new record button and add the field right after the


docmd.gotorecord,,acNew

me.field = forms![MyParentForm]![MyField]


rollie@besys.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top