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

Sharing Values between Forms

Status
Not open for further replies.

MikeMcKeown

Programmer
Apr 1, 2003
69
GB
Hi all,

I have an unbound control on a form which is based on the following fields from an Employee table(Empolyee_Id and Surname. When the users selects one the ID is stored.

i have another form which is based on all the details from the Employee table. If I was in this form and selected to open the form above which is not based on any table i.e. no fields list.

Is there a way that I can automatcially populate the unbound control on the form with the value from the other form.

I know you can do this between table, but can you do it with unbound controls?

 
as long as the other form is open, then you can put in the controlSource something like:

forms![frnName]![controlName]

--------------------
Procrastinate Now!
 
I would put this is the control source and the row source would be blank?
 
eh, no, sorry, you should put this in the rowsource, that's what determins what shows up as things you can pick in a combobox...

the controlSource points to the value that you've actually picked...

--------------------
Procrastinate Now!
 
How are ya MikeMcKeown . . . . .

In the Load event of your Employee form, copy paste the following:
Code:
[blue]Me![purple][b]UnboundControlName[/b][/purple] = Forms![purple][b]DetailFormName[/b][/purple]![purple][b]ControlName[/b][/purple][/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top