Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i setup a combo box to list entries when clicked

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I'm new to programming in VB6 and want to know how to enter the entries on a combo box when clicked.
 
Try this:

cmbEvent.Clear
SqlTxt = "SELECT * from EventMstr order by event_dt desc "
Set rstEventMstr = dbsFruit.OpenRecordset(SqlTxt, dbOpenDynaset)
If rstEventMstr.EOF Then
MsgBox "Event must be added before inventory "
rstEventMstr.Close
Exit Sub
End If
Do While Not rstEventMstr.EOF
With rstEventMstr
cmbEvent.AddItem !Event_Dt & " " & !event_desc
.MoveNext
End With
Loop
rstEventMstr.Close
cmbEvent.Text = cmbEvent.List(0)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top