adding multiple records into one text box

cadillac

Registered User.
Local time
Today, 11:54
Joined
May 9, 2001
Messages
34
is it possible to take the data input into a text box on a form and put it into the text box of another open form (here's the tricky part), but keep adding numerical data to the first form and have the second form add the data to the same text box as it is entered into the first form.

for example

form 1 :
quantity description
5 crabs
6 fish
8 crabs
form 2 :
total quantity description
?? crabs
?? fish

the 5 crabs would be input into the quantity in the first form and the total quantity of the second form, then when the 8 crabs are entered into the first form the total quantity of crabs in the second form should change from 5 to 13.

if this is possible i would like to know. i can make the data move from form to form, but i can't get it to add(i don't know how that is).

thanks
 
I'll bet you could do it with the "OnChange" event of the master text box. Since the slave text box is on another form, you'll have to put in all the correct references, but something like this:

Private Sub TextBox1_Change()
OtherForm!TextBox2 = Me!TextBox1
End Sub

Tell me if it works,

Matt
 
that may work, but i want the second form to add together all the inputs from the first form. maybe otherform!textbox = me!textbox + otherform!textbox
also only certain records should go into the first form. like if they put in 5 crabs then i only want that value to go into the crab count text box. maybe an if statement. i'm really not sure.
 
What an odd request!

Why don't you just use a totals query to total your quantities and then base a form on this query.
 
now see there! i post a stupid question and finally someone sees the obvious! i am currently hitting myself in the head. i think that would work, i may have over thought the problem. thanks for all the help guys/gals, this forum is a real lifesaver.
 

Users who are viewing this thread

Back
Top Bottom