passing values from one form to another

P

PamD

I am very new to VBA so I may not be explaining my
problem clearly but I sure hope I am. I have a FormA and
a FormB (subform). All events for both forms are done in
VBA. I need to pass the value of txtbox2 on FormA to the
subroutine where the first calculations are done on
FormB. Can someone tell me how to pass the txtbox2 value
from FormA to FormB? Both forms are open.
 
J

Jeff Boyce

Pam

Rather than "passing", you could use a reference to the value. If you
already have a control ([txtbox2] on your mainform, and your subform needs
to "see" it, try something like (actual syntax may vary):

= Forms!YourMainFormName!txtbox2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top