Access 2003 - Select a value in a subform and display it in Main form

daveferguson

New member
Local time
Today, 23:14
Joined
Oct 7, 2008
Messages
2
I'm using MS Access 2003.

I have a form which displays drawing information (drg no, title, rev etc)
I also have two subforms which are linked to the drg no field in the main form and these show Parent and Child relationships for the drawing.
What I would like to do is click on either a Parent drg no or Child drg no in the subforms and have that value displayed as drg no in the main form so that it's Parent/Child information will subsequently be displayed.

Thanks in advance for any help offered!
 
I'm using MS Access 2003.

I have a form which displays drawing information (drg no, title, rev etc)
I also have two subforms which are linked to the drg no field in the main form and these show Parent and Child relationships for the drawing.
What I would like to do is click on either a Parent drg no or Child drg no in the subforms and have that value displayed as drg no in the main form so that it's Parent/Child information will subsequently be displayed.

Thanks in advance for any help offered!


create a button on each subform. In the onclick method of that button put
Code:
FORMS![Main Form Name]![control name].SetFocus
FORMS![Main Form Name]![control name].value = Me.[subformcontrol].value

Put your form name and your control name in the brackets (then remove the brackets) and that should do the job for you
 
Thanks dmonney.

Worked a treat!
 

Users who are viewing this thread

Back
Top Bottom