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

Getting values from one form to populate to another?

Status
Not open for further replies.

Ryon

Technical User
Nov 1, 2002
64
US
hello again,
I have a Clients form and on this form I have a button that opens up another form. Which is a request form( data entry). What I need is for the fields from the first form to populate to the second, so the request has all the client information already entered.

thanks Again!!!
Ryan
 
here is a thought

you can have global variables in a module which captures the entries in your Client form and when you load the Request form, just assign it the global variables...

so on_click button
assign the global variables

on_load Request form
assign the global variables to the text fields "so many events, so little time"
 
Could you be a little more specific about this procedure? We are also developing an application where an in-house e-mail form (a Word form) will need to populate a form in Access. Thanks!
 
sorry don't know much about Word form's,

if it was all in Access forms you can use the Module and put global variables there to hold the data

maybe you should re-post your question with more detail "so many events, so little time"
 
Hi,

You have FormA and FormB (FormB being the 'called' form).

Let's say you have txtA,txtB,txtC textboxes on both forms.

Call formB.

In formB <On Open> event - you need this.....

txtA = forms!formA!txtA
txtB = forms!formA!txtB
txtC = forms!formA!txtC

You can use global variables, but you can also refer directly to another form's controls as above.
If that doesn't work, try this:

txtA = forms!formA.txtA
txtB = forms!formA.txtB
txtC = forms!formA.txtC

or:

txtA = forms!formA!txtA.value
txtB = forms!formA!txtB.value
txtC = forms!formA!txtC.value

This help?

Regards,

Darrylle &quot;Never argue with an idiot, he'll bring you down to his level - then beat you with experience.&quot; darrylles@totalise.co.uk
 
Thanks for both replies.

Darylles-will this work across applications (Word to Access, for example). Will it be neccessary to add the name of the other application in the code, as it would be with GetObject?
 
Hi,

Yes you would need to refer to the application.

I was just showing an example of form object referencing.

You need to lok at Word basic (or whatever) help, concerning cross-application object referencing.

Regards,

Darrylle &quot;Never argue with an idiot, he'll bring you down to his level - then beat you with experience.&quot; darrylles@totalise.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top