-
March 31st, 2006, 07:28 AM
#1
Adding arrays between forms
Hi I've got a form of prices for a company's stock but would like to have another form showing these prices so the user is able to select how many they want, to then produce a text box showing the total, and then go onto produce an invoice.
I was just wondering how I can make the control arrays in the pricing form, show in the invoice arrays, and then multiply each array with amount needed.
Each individual text box in the array needs to be multiplied by each individual ammount to then be added all together to produce a total.
If anyone could help it would be much appreciated.
Thnx Jon
-
March 31st, 2006, 07:34 AM
#2
Re: Adding arrays between forms
what on earth r u talking about?!
-
March 31st, 2006, 08:42 AM
#3
Re: Adding arrays between forms
There are lots of ways to get values from one form to another; too many to list here in fact. If you have an array of controls on one form, how are these controls getting their data? You could just recreate the method for the array of controls on your second form.
If you have an identical control array on the second form, you could mirror the values from the first array into the second array with a loop
Code:
'on second form
Dim n as Integer
For n = LabelArray.Lbound to LabelArray.Ubound
LabelArray(n) = form1.LabelArray(n)
next n
You can pass controls around, you can use global variables, public procedures - the possibilities are endless (almost).
(\/)
(-.-)
(')(')
Bunny's quest for world domination continues.
-
March 31st, 2006, 10:09 AM
#4
Re: Adding arrays between forms
Another possibility, and one that I've used on many occasion, is to employ the use of the ParamArray keyword.
This can be very handy when dealing with controls that are NOT in a control array.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|