By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

Setting combo box value First record

P: n/a
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.ListIndex (1)

Any ideas?
Thanks for any suggestions.
Paul

Jan 2 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.