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

copying a field between two forms

Status
Not open for further replies.

martinrobson

Programmer
Jun 2, 2003
19
0
0
GB
Hi.

Please can someone help?

I have 2 forms, i would like an ID from form 1 to be copied across to form 2 when it is opened. The ID is generated by an algorithm.

At the moment i have some sql which will search the table to find the last id which was generated and populate the field with that value, however this could have problems if there is more than one user using the app'.

Is there a way of getting the id from form 1 to be displayed on form 2?

Thanks in advance for helping
Martin
 
Is the second form opened for additions only? Is the first form still open when you open the second?
If yes to both, then create a new text box. Set the control data to be the ID field in your second table. If you are not using a second table, then have this equal the field on your main table. Now change the default value to be "=[first form name]![field name]".

[pc]

Graham
 
Cheers Graham that worked a treat, fantastic, i can do away with the sql.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top