From: Billiam on
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
From: Douglas J. Steele on
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
http://I.Am/DougSteele
(no e-mails, please!)


"Billiam" <Billiam(a)discussions.microsoft.com> wrote in message
news:018433A5-AA1C-48E1-92F6-5B88271D5126(a)microsoft.com...
>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


From: Billiam on
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" wrote:

> 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
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
> "Billiam" <Billiam(a)discussions.microsoft.com> wrote in message
> news:018433A5-AA1C-48E1-92F6-5B88271D5126(a)microsoft.com...
> >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
>
>
>
From: Douglas J. Steele on
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
http://I.Am/DougSteele
(no private e-mails, please)


"Billiam" <Billiam(a)discussions.microsoft.com> wrote in message
news:B0722EBF-99AF-4FF0-A128-3DC6308E7583(a)microsoft.com...
> 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" wrote:
>
>> 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
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Billiam" <Billiam(a)discussions.microsoft.com> wrote in message
>> news:018433A5-AA1C-48E1-92F6-5B88271D5126(a)microsoft.com...
>> >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
>>
>>
>>


From: Billiam on
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" wrote:

> 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
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Billiam" <Billiam(a)discussions.microsoft.com> wrote in message
> news:B0722EBF-99AF-4FF0-A128-3DC6308E7583(a)microsoft.com...
> > 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" wrote:
> >
> >> 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
> >> http://I.Am/DougSteele
> >> (no e-mails, please!)
> >>
> >>
> >> "Billiam" <Billiam(a)discussions.microsoft.com> wrote in message
> >> news:018433A5-AA1C-48E1-92F6-5B88271D5126(a)microsoft.com...
> >> >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
> >>
> >>
> >>
>
>
>