combobox list of values start

B

Billiam

I have a combobox with a list of times. I would like to have the starting
combobox time at a certain value from the list...

cboEndTime is based on lt_Time (times from 12:00 am to 12:00 pm in 15 minute
intervals). Using a query, I can get the pm times to start the cboEndTime, I
would prefer, however, to start with a specific time).

So, can you specify which value is listed first ina combobox?

Thanks,

Billiam
 
D

Douglas J. Steele

The only way to specify which value is listed first would be to have an
appropriate ORDER BY clause in the query.
 
B

Billiam

Hi Douglas,

I cannot seem to get the sql correct for the order by clause, at best I can
get the PM values but starting from midnight and not noon.

SELECT lt_Time.[Time]
FROM lt_Time
ORDER BY lt_Time.[Time] DESC

How do I add which value to start at?

I know I can just build a query to do the job, but I am interested to know
how to start a combobox at a specific value in the lookup/reference list it
is based on.

Thanks,

Billiam
 
D

Douglas J. Steele

SELECT lt_Time.[Time]
FROM lt_Time
WHERE It_Time.[Time] > #15:30:00#
ORDER BY lt_Time.[Time] DESC

Incidentally, you really should rename your field. Time is a reserved word,
and using reserved words can lead to problems.

For a comprehensive list of names to avoid (as well as a link to a free
utility to check your application for compliance), check what Allen Browne
has at http://www.allenbrowne.com/AppIssueBadWord.html


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Billiam said:
Hi Douglas,

I cannot seem to get the sql correct for the order by clause, at best I
can
get the PM values but starting from midnight and not noon.

SELECT lt_Time.[Time]
FROM lt_Time
ORDER BY lt_Time.[Time] DESC

How do I add which value to start at?

I know I can just build a query to do the job, but I am interested to know
how to start a combobox at a specific value in the lookup/reference list
it
is based on.

Thanks,

Billiam
Douglas J. Steele said:
The only way to specify which value is listed first would be to have an
appropriate ORDER BY clause in the query.
 
B

Billiam

Thank you Douglas! It did come to me in the middle of the night that I might
be able to use greater than...Thank you for confirming that!
Thanks for the reminder about Reserved Words...I had totally forgotten that.
Many thanks again for your help. It is sincerely appreciated! Have a great
weekend, and possibly Thanskgiving!

Best Regards,
Billiam

Douglas J. Steele said:
SELECT lt_Time.[Time]
FROM lt_Time
WHERE It_Time.[Time] > #15:30:00#
ORDER BY lt_Time.[Time] DESC

Incidentally, you really should rename your field. Time is a reserved word,
and using reserved words can lead to problems.

For a comprehensive list of names to avoid (as well as a link to a free
utility to check your application for compliance), check what Allen Browne
has at http://www.allenbrowne.com/AppIssueBadWord.html


--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Billiam said:
Hi Douglas,

I cannot seem to get the sql correct for the order by clause, at best I
can
get the PM values but starting from midnight and not noon.

SELECT lt_Time.[Time]
FROM lt_Time
ORDER BY lt_Time.[Time] DESC

How do I add which value to start at?

I know I can just build a query to do the job, but I am interested to know
how to start a combobox at a specific value in the lookup/reference list
it
is based on.

Thanks,

Billiam
Douglas J. Steele said:
The only way to specify which value is listed first would be to have an
appropriate ORDER BY clause in the query.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


I have a combobox with a list of times. I would like to have the
starting
combobox time at a certain value from the list...

cboEndTime is based on lt_Time (times from 12:00 am to 12:00 pm in 15
minute
intervals). Using a query, I can get the pm times to start the
cboEndTime,
I
would prefer, however, to start with a specific time).

So, can you specify which value is listed first ina combobox?

Thanks,

Billiam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top