making a combo box

Whitchurchcomputing

New member
Local time
Yesterday, 16:03
Joined
Jan 21, 2013
Messages
8
I need to make 2 combo boxes with the seat row in one (A,B,C e.t.c) and seat seat number in the other (1-15). I need to know how to make the combo box and enter thr details without using a wizard :o, and the seat numbers change depending on the seat row, finally I need to make it so that once a seat has been chosen it will disapear from the list :confused: I need help fast if possible.
thank you
 
It would appear that you are doing a student project???
Your question is quite a bit more complicated than you may expect.

I just happen to have been working on building a combobox today. So I will post the code below. The code below works from a table. Your code will also need to pull its information from a table. Your table will also need a logical fields to define whether the seat is taken or not. But it will be up to you to figure out how to adapt the code below to your needs. MS Access help would also be useful. Use the key words found in the example. After all, assuming that you are a student, this needs to be learning experience.

Code:
Public Sub BuildState1()
    Me.D6Field1001.Properties("RowSource") = ""
    Set BuildComboBoxRS = CurrentDb.OpenRecordset("SELECT * FROM " & csStateList & " ORDER by StateAbbreviation;", dbOpenDynaset, dbSeeChanges)
    BuildComboBoxRS.MoveFirst
    Me.D6Field1001.Properties("RowSourceType") = "Value List"
    Me.D6Field1001.Properties("ColumnHeads") = False
    strItem = "0;No Selection"
    Me.D6Field1001.AddItem Item:=strItem
    Do Until BuildComboBoxRS.EOF
        strItem = BuildComboBoxRS!StateIDnum & ";" & BuildComboBoxRS!StateAbbreviation
        Me.D6Field1001.AddItem Item:=strItem
        BuildComboBoxRS.MoveNext
        Loop
    BuildComboBoxRS.Close
    Set BuildComboBoxRS = Nothing
End Sub
 

Users who are viewing this thread

Back
Top Bottom