code that copies text

simeon_rose

Registered User.
Local time
Today, 15:17
Joined
Nov 4, 2000
Messages
34
is there some code that i can put behind a text box on a form that automatically makes it the same as text entered or generated in another text box on a different form? this way there will be no need for it to be entered more than once and so can guarantee data validation. if you could help, i'd be eternally grateful...thanks
 
If the 'other' form is open then code like Me![ThisTextBox] = Me![Forms]![OtherFormName]![OtherTextBoxName] in the On Current event of the form or the On Enter event of the Text Box will work. If the other form is closed then you will need to use DLookup or other code to find the matching data in the correct table.

HTH,
Jack

[This message has been edited by Jack Cowley (edited 11-19-2000).]
 
can somebody please explain to me what code i will need to use or how to use Dlookup as the other form will be closed. i may be asking stupid questions...but i really have not got a clue. sorry!
 
Try searching Help for DLookup. There are some good examples there of how to use this function.
 

Users who are viewing this thread

Back
Top Bottom