Im getting the error on trying to edit my text box with code. There is no before update event so I am guessing its a validation rule error.
Here is my code:
Code:
If IsNull(Doctorcombo) Then
Doctorcombo2.Visible = False
DoctorAddress.Visible = False
ElseIf Doctorcombo = "Bankhouse Surgery" Then
Doctorcombo2.Visible = True
Me.Doctorcombo2.RowSource = ""
Doctorcombo2.AddItem "DrOne"
Doctorcombo2.AddItem "DrTwo"
DoctorAddress.Visible = True
[DoctorAddress].SetFocus
'error on this section
DoctorAddress.Text = "hello" & vbCrLf & _
"world" & vbCrLf & _
"world" & vbCrLf & _
"world"
All I am trying to do is enter an address in the text box when a certain combo box option is selected , hello world is just an example to try get it to work.
Please help.