Setting combo box value First record

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • paulquinlan100@hotmail.com

    #1

    Setting combo box value First record

    Hi

    I have a combo-box which is filled with values from a query with the
    current record ID as a parameter. This all works fine, except the
    combobox always starts with a blank record so at first glance would
    appear empty when in actual fact its filled with a number of values.

    I've tried using the following but i get the error "Invalid use of
    property" on the listindex line.

    inpPC = InputBox("Add New Date:", "Add")
    sRef = Forms!frmsites! txtSite_Ref
    sSQL = "insert into C_Dates (SiteID,C_Date) values (" & sRef &
    ",""" & inpPC & """);"
    DoCmd.RunSQL sSQL
    cmbDIPC.Requery
    cmbDIPC.ListInd ex (1)

    Any ideas?
    Thanks for any suggestions.
    Paul

Working...