Store data in string

Dina01

Registered User.
Local time
Today, 23:45
Joined
Apr 24, 2002
Messages
87
I have a form that when you click on the cmd button it will transfer the value of the text box to the other form.

This is the code I used....

Forms![PCV_Dispatch_form]![txtCodeSupervisor].Value = Me![txtCodeSupervisor].Value

When I look at the PCV_Dispatch_form I see that the value was transfered, but then what I would like to do is store the value in txtCodeSupervisor.

So I add the following in the PCV_Dispatch_form..
***************

Private Sub Form_Open(Cancel As Integer)

Public strCodeSupervisor As Integer
strCodeSupervisor = Me![txtCodeSupervisor].Value

end sub

But I keep on getting error that it can't contain a Null Value...Why is it that my value is not storing in my strCodeSupervior..

Can anyone please help..

Thanks in advance
 
Just a guess...
I think that the Form_Open is done before the fields are filled with records.
Try with the Form_Load.
Newman
 
Why does it not save the value you've transfered, have you tried just saving the record?
 
Hello

I have tried the Form_load and also Form _Current but it still gives a Null...I don't see why cause I do see the number in the textbox.....

Anymore suggestions
 

Users who are viewing this thread

Back
Top Bottom