passing a variable between 2 forms

will

Registered User.
Local time
Today, 14:54
Joined
Jul 11, 2001
Messages
18
I am trying to pass values entered from one form into the text box of another form. I have one form where I record payments from clients, and I would like the information displayed in a textbox of my main form, but I keep getting the error that "(my database) cannot find the field XXX referred to in your expression", the code that I am using to pass the variables is as follows,
(a and b are the payment date and amount)

dim e as string
e = a + b
Forms!MainForm!Subform!Field = e

I think it has something to do with global variables, but im not sure, can anyone help?
Thanks!
 

Users who are viewing this thread

Back
Top Bottom