Rabu, 18 Mei 2011

RE: [MS_AccessPros] Loading Combo Box

 

Mike-

Unless you set the value of the combo box, it has a default value that matches a
returned value, or is bound to a field in the underlying recordset that has a
matching value, the combo box will appear blank. What do you want so show up?
If you want the combo to display the first item in the list, do:

Me.CMB_PLATFORM = Me.CMB_PLATFORM.ListIndex(0)

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of mithomas48
Sent: Wednesday, May 18, 2011 11:23 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Loading Combo Box

Need help loading a combo box on the on open event. We need the combo box to
show the values returned in the SELECT statement when the form opens. The combo
box has 2 columns and 1 is bound. Column widths are set to 0";1". Here is the
SELECT statement that is working correctly.

Me.CMB_PLATFORM.RowSource = "SELECT LOOKUP_VALUE, LOOKUP_DESC FROM
LSDMGR_MOD_LOSS_MIT_LOOKUP " & _
"WHERE (((LOOKUP_TYPE)='PLATFORM_LEVEL') " & _
"AND ((LOOKUP_VALUE) = 4));"

The SELECT is pulling the correct data in the two fields, it's just not
displaying in the combo box when the form opens.

Thanks in advance!
Mike

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

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar