Mr. Lebans May be able to solve this question with list box

  • Thread starter Brian Paul via AccessMonster.com
  • Start date
B

Brian Paul via AccessMonster.com

Thank you Mr. Lebans for your many examples of list box. they are easy to
follow. Anyhow I have a form with 2 cascading list boxes. The first list
box I have 2 colums. Colum 0 has a date formatted to dddd to display the day
of the week and colum 1 has the same field but formated to show the short
date and displays for example 03 Jun 96.

When I select one of the dates in the first listbox I get the results in the
second listbox. In the second list box In colum0 which is hidden by setting
its length to 0 In the querry i set it to match the Colum in the first list
box so it works fine.

Now that you know how that works. What I would like to do is when I open the
form, I would like it to automatically highlight todays date in the first
list box, thus; displaying record results in the 2nd. However, If there is
no entry for todays date in the first listbox it highlights tomorrows date or
next available date in the first list box.

Thanks,

PS. If this one could be figured out, I feel this would benifit alot of
people that have appointment calander, etc.
and would be a nice addition to an MVP's web site.
 
D

Dirk Goldgar

Brian Paul via AccessMonster.com said:
Thank you Mr. Lebans for your many examples of list box. they are
easy to follow. Anyhow I have a form with 2 cascading list boxes.
The first list box I have 2 colums. Colum 0 has a date formatted to
dddd to display the day of the week and colum 1 has the same field
but formated to show the short date and displays for example 03 Jun
96.

When I select one of the dates in the first listbox I get the results
in the second listbox. In the second list box In colum0 which is
hidden by setting its length to 0 In the querry i set it to match the
Colum in the first list box so it works fine.

Now that you know how that works. What I would like to do is when I
open the form, I would like it to automatically highlight todays date
in the first list box, thus; displaying record results in the 2nd.
However, If there is no entry for todays date in the first listbox it
highlights tomorrows date or next available date in the first list
box.

Thanks,

PS. If this one could be figured out, I feel this would benifit alot
of people that have appointment calander, etc.
and would be a nice addition to an MVP's web site.

You never replied to my follow-up question when I was working with you
on this issue before. I gave you an answer that ought to be workable,
though it might need a little tweaking. What happened?
 
B

Brian Paul via AccessMonster.com

Dirk said:
Thank you Mr. Lebans for your many examples of list box. they are
easy to follow. Anyhow I have a form with 2 cascading list boxes.
[quoted text clipped - 20 lines]
of people that have appointment calander, etc.
and would be a nice addition to an MVP's web site.

You never replied to my follow-up question when I was working with you
on this issue before. I gave you an answer that ought to be workable,
though it might need a little tweaking. What happened?

I did reply. Never got a response back so I figured you lost interest.
 
B

Brian Paul via AccessMonster.com

Dirk said:
Thank you Mr. Lebans for your many examples of list box. they are
easy to follow. Anyhow I have a form with 2 cascading list boxes.
[quoted text clipped - 20 lines]
of people that have appointment calander, etc.
and would be a nice addition to an MVP's web site.

You never replied to my follow-up question when I was working with you
on this issue before. I gave you an answer that ought to be workable,
though it might need a little tweaking. What happened?

What I ended up doing temporarly. I created a 2nd listbox. On the 1st
listobox query under date I just set the listbox to go from yesterday back.
On the new listbox I just set it today forward. Doesnt highlight anything,
Just changed the font color in different Listboxes so I new what was archived
and what wasn't on the second listbox
 
B

Brian Paul via AccessMonster.com

Dirk said:
Thank you Mr. Lebans for your many examples of list box. they are
easy to follow. Anyhow I have a form with 2 cascading list boxes.
[quoted text clipped - 20 lines]
of people that have appointment calander, etc.
and would be a nice addition to an MVP's web site.

You never replied to my follow-up question when I was working with you
on this issue before. I gave you an answer that ought to be workable,
though it might need a little tweaking. What happened?

Wow. You did reply...My fault...Sorry....Here was your post had to go back
about 30 pages in the other newsgroup but I did find it.. Will Debug and
post back

I'm obviously overlooking something. Try inserting a debugging
statement to display the value of each row's bound column, like this:

For lRow = Abs(.ColumnHeads) To (.ListCount - 1)

Debug.Print "Row "; lRow, .ItemData(lRow) '**debugging

If CDate(.ItemData(lRow)) >= Date Then

After the code runs and the error is raised, check the Immediate Window
for the list of values associated with each row.
 
D

Dirk Goldgar

Brian Paul via AccessMonster.com said:
Dirk said:
Thank you Mr. Lebans for your many examples of list box. they are
easy to follow. Anyhow I have a form with 2 cascading list boxes.
[quoted text clipped - 20 lines]
of people that have appointment calander, etc.
and would be a nice addition to an MVP's web site.

You never replied to my follow-up question when I was working with
you on this issue before. I gave you an answer that ought to be
workable, though it might need a little tweaking. What happened?

I did reply. Never got a response back so I figured you lost
interest.

You had two separate threads open, in which I was participating:

"Air Code Mr. Goldgar Cascade Listbox to highlite, select closest"
(last message, from me, September 22)
http://groups.google.com/group/micr..._frm/thread/7ff6f73774d93e73/4a47c78aaf7f138a

and

"My Last Post about List box solution didn't work..Try to exp bette"
(last message, from me, September 21)
http://groups.google.com/group/micr..._frm/thread/3b670475da5d8228/5a51501b855ee425

Are you using a threaded view in whatever program or web forum you're
using to read news?
 
B

Brian Paul via AccessMonster.com

No I wasnt. Thats where I got screwed up. On the very first post, the time
delay in the posts made it difficult to find due to so many posts.
So I posted a 2nd time. explaining I already posted the first.

When I first read the 2nd post I didn't see a response.
After this post it took me over 40 min to go back through the posts to find
out that you did reply. However I'm glad you didn't give up becuase
you would have never seen this post.

Any recommendation on how to avoid me looking like an idiot in the future
would be helpful. I will get my laptop back tomorrow so I can debug
and reply to your last post. Where do you want me to reply at so If anyone
decides to view in future wont have them going all over the place. I
Know how difficult becuase I have had to follow a posting that I wasn't a
participant but just interested in the solution given to a question

Thanks,


Dirk said:
[quoted text clipped - 8 lines]
I did reply. Never got a response back so I figured you lost
interest.

You had two separate threads open, in which I was participating:

"Air Code Mr. Goldgar Cascade Listbox to highlite, select closest"
(last message, from me, September 22)
http://groups.google.com/group/micr..._frm/thread/7ff6f73774d93e73/4a47c78aaf7f138a

and

"My Last Post about List box solution didn't work..Try to exp bette"
(last message, from me, September 21)
http://groups.google.com/group/micr..._frm/thread/3b670475da5d8228/5a51501b855ee425

Are you using a threaded view in whatever program or web forum you're
using to read news?
 
D

Dirk Goldgar

Brian Paul via AccessMonster.com said:
Any recommendation on how to avoid me looking like an idiot in the
future would be helpful.

Apparently you're posting via AccessMonster. I'm not really familiar
with that website, but make sure that you don't have the Thread View
option set for Single Message View. Or you could work through the
Microsoft web newsreader instead,

http://www.microsoft.com/office/community/en-us/default.mspx

Or you could do what most of the really frequent posters do -- if your
work environment will let you -- and use a real newsreader program (such
as Outlook Express, which I use, though many prefer others) to read the
newsgroups directly on the news server at said:
I will get my laptop back tomorrow so I can debug
and reply to your last post. Where do you want me to reply at so If
anyone decides to view in future wont have them going all over the
place.

It would probably be better to reply in the original thread -- probably
the second of the two -- so that the discussion is all kept together and
we don't trouble Stephen Lebans with a bunch of posts with his name in
the subject.

I have Outlook Express set to automatically highlight posts in threads
I'm involved in, so I won't overlook your reply.
 
Top