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

adding variable through multiple forms!

Status
Not open for further replies.

sparky777

Technical User
Apr 21, 2001
3
0
0
US
could anybody help me,

i have a program which deals with customer orders.

when an order is placed the amount which is strAnswer2 is displayed on another form with a concatenation of text.

i have added another textbox on the form to show a total cost, intended, i want the variable stranswer2 to add to the existing answer of stranswer2 each time i place an order.

ie..first order placed....nextform shows cost of order, value of this order also shown in the textbox

next order placed...nextform adds the order to the list, value of this order added to the existing value of the previous order.

and so on.

if any body could give me a general idea, if not the coding solution i will be grateful to you.

if you need to see my coding which i have to solve it i will gladly mail what i have to you.

thanks.

Pete.

 
I would make a public BAS module that contained the Public variables that are common to multiple forms. Then anywhere in your code, you can refer to those variables.

More complexly, you could have a Public variable in each form that you could set before you show that form, for example:

Form2.strAnswer2 = "xyz"
Form2.Show

Or you could create a Public Propery Let for each form.

Hope this helps a little.
 

See my FAQ: faq222-400 for hints on how to transfer data from one form to another.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top