ledgerr.rob
Registered User.
- Local time
- Today, 15:22
- Joined
- Jun 3, 2012
- Messages
- 68
Good morning folks,
I've come across a problem that doesn't make sense to me. I have a form with a combo box on it. Each time the combo box is used or the form is moved to another record it triggers an event to update the text boxes.
I get the information for the text boxes from a query. Everything was working smoothly until I decided to add a text box to the form to be filled in. My thought was I add the column from the query to the code and it will update. No dice. It doesn't recognize any information in the query. But when I run the query as a standalone it sees the text. When i open the table that holds the text, it is still there.
When i step through the code it shows values for each of the columns except for column 11. It reports as 'null.'
Things I've tried:
Updating the combo box by reselecting the value for the record.
Restarting DB.
Changing from one record in the combo box back to the original record.
Is there a limit of columns that can be used? Column 10 works just fine...
Thanks for any tips.
regards,
rob
I've come across a problem that doesn't make sense to me. I have a form with a combo box on it. Each time the combo box is used or the form is moved to another record it triggers an event to update the text boxes.
I get the information for the text boxes from a query. Everything was working smoothly until I decided to add a text box to the form to be filled in. My thought was I add the column from the query to the code and it will update. No dice. It doesn't recognize any information in the query. But when I run the query as a standalone it sees the text. When i open the table that holds the text, it is still there.
Code:
Private Sub cboDoctor_AfterUpdate()
'update doctor fields on the update of the combo box
If Len(Me.cboDoctor) > 0 Then
Call DoctorName_Change
Else
Call DoctorNameBlank_Change
End If
End Sub
'*************************************************************
Private Sub DoctorName_Change()
Me.txtDoctorType = Me.cboDoctor.Column(1)
Me.txtDoctorOffice = Me.cboDoctor.Column(11)
Me.txtDoctorFirst = Me.cboDoctor.Column(2)
Me.txtDoctorLast = Me.cboDoctor.Column(3)
Me.txtDoctorPhone = Me.cboDoctor.Column(4)
Me.txtDoctorEmail = Me.cboDoctor.Column(5)
Me.txtDoctorAddy1 = Me.cboDoctor.Column(6)
Me.txtDoctorAddy2 = Me.cboDoctor.Column(7)
Me.txtDoctorCity = Me.cboDoctor.Column(8)
Me.txtDoctorState = Me.cboDoctor.Column(9)
Me.txtDoctorZip = Me.cboDoctor.Column(10)
End Sub
When i step through the code it shows values for each of the columns except for column 11. It reports as 'null.'
Things I've tried:
Updating the combo box by reselecting the value for the record.
Restarting DB.
Changing from one record in the combo box back to the original record.
Is there a limit of columns that can be used? Column 10 works just fine...
Thanks for any tips.
regards,
rob