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

taking data calculated in a form and putting into another

Status
Not open for further replies.

ibvma

Programmer
Jun 24, 2002
5
US
Is this even possible. If so, I need some help.

I have some very involved and complex calculations to do and they work great in a Form (they get too complicated in a query) but I would like to do the calculations in one form and transfer the results to another. I want all the smaller calculations "hidden" with just the results showing

Thanks in advance
 
assuming the form is still open just refer to the field in the other form

=forms!yourreferingformname!fieldtotalname
 
I've tried that and I keep getting an error message. I've even tried forms.formname.fieldname and that doesn't work either.
 
Sounds like you need to use a different name for your control

ex:
2 flds in table firstname and lastname

control on form is named lastname and you use =([lastname] &" "&[firstname])in the control source
This will generate an error because lastname is already in use on the form.

change the control name to "completename" now it works
 
Assuming your complex form is called frmcomplex and the second form which will have the results of some of the calculations on the first form is named frmsimple, and further assuming both forms are active (you can make the complex form invisible if you want the users attention riveted to the simpler form).

A further assumption, the results on the complex forms are named complex1 and complex2 and the fields on the simple form are named simple1 and simple2, then in the on current event of the simple form include the following

With forms!frmcomplex
Me.simple1.value = .complex1.value
Me.simple2.value = .complex2.value
End with

Notice that I am using control names, not the names of the underlying variables.
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top