put query result to cbo control on the form

S

Song Su

I have a query as follows:

SELECT TOP 1 qryVisitData.timeIn
FROM qryVisitData
ORDER BY qryVisitData.timeIn DESC;

I want to assign the query result to my cboTO control on my form so when I
open the form, I already have the default date. How to do it? Thanks.
 
D

Douglas J. Steele

Why bother using a combo box if you're only going to allow a single choice?

Try an unbound text box with a control source of

=DMax("TimeIn", "qryVisitData")
 
S

Song Su

Thanks, Doublas. It works great! I use combo box because the drop down
button will activate a calendar control so user can pick a different date.
 
Top