foxxrunning
Member
- Local time
- Today, 11:25
- Joined
- Oct 6, 2019
- Messages
- 109
I have a combo box on a form which displays Id, Last and First names. I want the CBO to save the Id and fill in the Last and First names in their respective fields on the form.
This is the code placed in the On Change event of the CBO.
Private Sub cboPatient_Number_Change()
Me.txtLastName.Value = Me.cboPatient_Number.Column(1)
Me.txtFirstName.Value = Me.cboPatient_Number.Column(2)
End Sub
When I hover my mouse over the txt.LastName.Value or over the txt.FirstName.value I get a NULL value for these. When I hover my mouse over the Me.CboPatient_Number.column(1) or (2) I see the appropriate values as chosen by the CBO Patient_Number.
Does anyone have any idea why these values are not properly transferred to the left side of the equations?? Thanks for any help.
This is the code placed in the On Change event of the CBO.
Private Sub cboPatient_Number_Change()
Me.txtLastName.Value = Me.cboPatient_Number.Column(1)
Me.txtFirstName.Value = Me.cboPatient_Number.Column(2)
End Sub
When I hover my mouse over the txt.LastName.Value or over the txt.FirstName.value I get a NULL value for these. When I hover my mouse over the Me.CboPatient_Number.column(1) or (2) I see the appropriate values as chosen by the CBO Patient_Number.
Does anyone have any idea why these values are not properly transferred to the left side of the equations?? Thanks for any help.