Minggu, 02 Oktober 2011

RE: [MS_AccessPros] Field from Combo Box not showing up

Place a break point in the code and step through the code one line at a time to find out the values. If you don't understand how to add a break point or how to see the values, just ask.

Duane Hookom
MS Access MVP (2001-2011)

To: MS_Access_Professionals@yahoogroups.com
From: drtolson@verizon.net
Date: Sun, 2 Oct 2011 20:16:25 +0000
Subject: [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


[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar