Minggu, 02 Oktober 2011

[MS_AccessPros] Field from Combo Box not showing up

 

Great Day, I have a subform that allows the user to select a vehicle to be serviced. The user selects the vehicle from a combo box. The combo box has five fields, and column three of the combo box, cboVehicles.column(2), is the tag number of the vehicle selected. I have the following code in the combo boxes after update event:

Private Sub cboVehicles_AfterUpdate()

mbResponse = MsgBox("Is this " & cboVehicles.Column(1) & " with tag number " & cboVehicles.Column(2) & " the correct vehicle for this repair order?", vbYesNo, "Correct Vehicle?")
If mbResponse = vbYes Then
Me.txtMakeModelYear2 = cboVehicles.Column(1) & " (" & cboVehicles.Column(4) & ")"
Me.txtTagNo2 = cboVehicles.Column(2)
Me.txtVIN2 = cboVehicles.Column(3)

Else
mbResponse = MsgBox("Please select the correct vehicle.", vbOKOnly, "Correct Vehicle?")
End If
Exit Sub
End Sub

Me.txtTagNo2 = cboVehicles.Column(2) should place the vehicles tag number in the field txtTagNo2; however, the field is showing up blank on the form, but the other two fields are showing up properly. I went to the immediate window and column(2) is the correct tag number. The field is enabled and it is not locked, and visible is set to yes.

Thanks in advance for your assistance.

r/David

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar