G
Guest
Hello,
I have a main menu that opens different forms. Each button opens a form and
assigns a particular value to a text box in that form. So for example, this
is the code I have for one of those buttons:
DoCmd.OpenForm "frm_Pt_Info_IndividualOffice", acNormal
Forms!frm_Pt_info_individualoffice!txt_Header_Dpt = "Radiology"
When the form opens, I can see the "Radiology" text in the textbox. However,
when I try to assign the value of another textbox to the value of
txt_Header_Dpt I get an error message because, apparently, the value of
txt_Header_Dpt is null. This is what I used:
Me.DEPARTMENT.DefaultValue = Me.txt_Header_Dpt
I confirm the Null value of that text box by adding this line of code:
MsgBox "Value of dpt is " & Me.txt_Header_Dpt.Value
The only thing that I got when I run that code was "Value of dpt is "
Any ideas? Thanks!
I have a main menu that opens different forms. Each button opens a form and
assigns a particular value to a text box in that form. So for example, this
is the code I have for one of those buttons:
DoCmd.OpenForm "frm_Pt_Info_IndividualOffice", acNormal
Forms!frm_Pt_info_individualoffice!txt_Header_Dpt = "Radiology"
When the form opens, I can see the "Radiology" text in the textbox. However,
when I try to assign the value of another textbox to the value of
txt_Header_Dpt I get an error message because, apparently, the value of
txt_Header_Dpt is null. This is what I used:
Me.DEPARTMENT.DefaultValue = Me.txt_Header_Dpt
I confirm the Null value of that text box by adding this line of code:
MsgBox "Value of dpt is " & Me.txt_Header_Dpt.Value
The only thing that I got when I run that code was "Value of dpt is "
Any ideas? Thanks!