473,503 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reminder dates in listbox

tuxalot
200 New Member
Hi all,

I have a select query like this:
Expand|Select|Wrap|Line Numbers
  1. SELECT   qryTrackingDate.[Employee ID],
  2.          qryTrackingDate.[Trace Date],
  3.          qryTrackingDate.ELastName,
  4.          qryTrackingDate.EFirstName
  5. FROM     qryTrackingDate
  6. WHERE    (((qryTrackingDate.[Trace Date])>Date()))
  7. ORDER BY qryTrackingDate.[Trace Date];
This presents in a list box of items that require follow-up - the user selects the tracking date. I would like the dates that are within 5 days of expiring to show in red text. A second feature might be to add an on open event that can email a user that a date is about to expire, but that might be something for a different day.

As always, any help is much appreciated!

Tux
Nov 17 '09 #1
22 2245
ADezii
8,834 Recognized Expert Expert
@tuxalot
I would like the dates that are within 5 days of expiring to show in red text.
Don't think that this would be feasible. Why not simply have a 2nd List Box for this Function, or prompt the User for a specific amount of Days within an Expiration Date prior to populating the List Box?
Nov 17 '09 #2
ChipR
1,287 Recognized Expert Top Contributor
I'm not sure that this is possible within a list box, but you could certainly open a continuous form (or a subform on the form) with this as the data set, and use conditional formatting on the expiration date control. A button on the form could be used to send email notices for multiple records, or a button on each record for individual ones. Lots of options.
Nov 17 '09 #3
tuxalot
200 New Member
A second listbox is an option - but prompting the user for a specified date might not. Some items may be put on the "tickler" for 30 days, others maybe only a few days. Depends on the issue at hand.

Not sure how to implement a second listbox. Perhaps you can point me in the right direction or provide examples?

I've attached a png for reference.

Thanks,

Tux
Attached Images
File Type: jpg notes.jpg (19.1 KB, 195 views)
Nov 17 '09 #4
ADezii
8,834 Recognized Expert Expert
@tuxalot
the user selects the tracking date.
Do you mean 'Trace Date' as derived from Column 2 in the List Box? If not, then how is the User selecting the Tracking Date?
Nov 17 '09 #5
NeoPa
32,557 Recognized Expert Moderator MVP
Tux,

It helps if you only refer to items that you have explained. It makes it so much easier to communicate clearly. Otherwise we spend loads of time wondering what you mean by Tracking Date and reformatting your SQL to see if anything there is relevant (one assumes not if it's just dumped in as a single line - mostly invisible to the reader without painful scrolling).

In answer to your question, you would need to change your WHERE clause to filter out all but the records you need to see highlighted. I'm unable to clarify that as yet, as your specification makes little sense at the moment.
Nov 17 '09 #6
tuxalot
200 New Member
To clarify:

NeoPa - I figured placing the sql between code tags was the preferred method to keep it clean - now I know otherwise.

I do not want to filter out entries using the where clause. I want them to appear in the listbox as they are. Only the entries approaching expiration should show in red text while the others lower in the list (with the list in ascending order, as it is now) will show as standard text. I hope this makes sense.

ADezii - The user is selecting the tracking date using the date picker in the comments form to the left.
Nov 17 '09 #7
NeoPa
32,557 Recognized Expert Moderator MVP
@tuxalot
I hope it's clear that using the CODE tags is not optional.

The CODE tags won't make it readable all on their own though. If you want it to be readable then you need to use a bit of common sense and format it yourself, just as you should in your code anyway. If I found code like that that I was expected to work on professionally, my first step would be to shoot the originator to ensure no-one ever had to suffer their code in future.

I'm not likely to come across your code professionally of course, and your style there is your own business. Here though, you are expected to make it readable if you want us to read it for you.
@tuxalot
It makes sense, but only in as much as this was clear earlier and you were told twice (it seems to me) that this is not possible.

An alternative, that you expressed interest in, was to create a separate ListBox where only the items you are interested in are included. Now you seem to be saying this is not what you're interested in. Fair enough, but it would be easier if you were clear about exactly what you did want.
Nov 17 '09 #8
ADezii
8,834 Recognized Expert Expert
With incomplete information, and using a Table directly instead of an Intermediate Query, the SQL Statement for populating the 2nd List Box would be something similar to:
Expand|Select|Wrap|Line Numbers
  1. SELECT tblTest.EmployeeID, 
  2.        tblTest.[Trace Date], 
  3.        tblTest.ELastName, 
  4.        tblTest.EFirstName
  5. FROM tblTest
  6. WHERE (DateDiff("d",Date(),[Trace Date])<=5 And DateDiff("d",Date(),[Trace Date])>0)
  7. ORDER BY tblTest.[Trace Date];

P.S.
- Just read your Post #7, simply substitute the Date extracted from the Date Picker for [Trace Date] in the WHERE Clause of the SQL Statement. Again, to the best of my knowledge, this cannot be done (Multiple Text Formats) within the context of a single List Box.
Nov 17 '09 #9
tuxalot
200 New Member
NeoPa - You sure make it difficult to enter into Access programming using this forum. Is this forum not for people like me to bring possibly poorly written code, or to approach knowledgeable people like yourself with a need to see if a desired function is feasible in their database? I think the below sql is cleaner and easier on the eyes.

Expand|Select|Wrap|Line Numbers
  1. SELECT qryTrackingDate.[Employee ID], qryTrackingDate.[Trace Date], qryTrackingDate.ELastName, qryTrackingDate.EFirstName
  2. FROM qryTrackingDate
  3. WHERE (((qryTrackingDate.[Trace Date])>Date()))
  4. ORDER BY qryTrackingDate.[Trace Date];
BTW, the code above is written by Access - perhaps you should take up the issue of "style" with Bill.

The second listbox is still an option - where you got that I was not interested in that? Maybe it was when I said the following:
Not sure how to implement a second listbox. Perhaps you can point me in the right direction or provide examples?
Thanks Adezii for being so helpful. And *** Edit Removed as flaming ***.
Nov 17 '09 #10
NeoPa
32,557 Recognized Expert Moderator MVP
@tuxalot
No. It was here.

I'm sure you appreciate that your attitude is not acceptable Tux. Part of my job is to protect our members from lazy people. They do not need people, asking for help, to show the attitude that taking any time to make the post readable is too much for them (as you seem to want to do).

Bill Gates bears no responsibility for your actions. If Bill were here asking for help then he, too, would be subject to our rules. As it is - You are, on both accounts.

Please check your PMs.
Nov 17 '09 #11
tuxalot
200 New Member
As I said, and I'll say again, I thought the text was readable. If it was not I stand corrected. I do review my posts, I try to include all relevant information to get the help I need. Lazy? Hardly. New? Yes. A quick look at my post count will show that I am new here and extending a little courtesy and understanding to us newbies would be appreciated.

I understand your time as well as the other experts that frequent this forum is valuable and it is not my intent to cause undue hardship. Educate. Don't bash. Your attitude Neo does not help anyone.
Nov 17 '09 #12
NeoPa
32,557 Recognized Expert Moderator MVP
83 posts New? Please. How much slack do you expect to be cut?

I say it as I see it Tux, and frankly your attitude is a long way from impressive. What you claim simply doesn't hold water. To be honest, words are just words. Your post before it was fixed was not easy to work with. Fact. A (very) little consideration would have fixed that. You can make all the claims you like, but deeds always speak louder than words.

PS. An apology, while denying any responsibility, is not worth the words it took to make it.
Nov 17 '09 #13
tuxalot
200 New Member
NeoPa - Let's face it - you bash many who are just trying to get some helpful advice here. Should not your attitude be exemplary? Just look through many of the recent posts here and in so doing it is likely that somewhere in the thread there is NeoPa, interjecting some snide remark. I spent time on the site today and there are many examples that confirm this. Why not just ease up? Are your derogatory remarks actually helping?

No, we are not perfect, we need to be coached and with educators and experts like we find here, we LEARN. Perhaps this site is best suited for experts asking questions of experts. Too bad, there are many like me who could use a helping hand.

I think enough has been said here. I'll steer clear of your posts and stick to those here who actually want to help and there are many.
Nov 18 '09 #14
NeoPa
32,557 Recognized Expert Moderator MVP
Fine words Tux, but it (quite typically) misses the point.

My responsibility is to protect our experts, as much as possible, from lazy and bad-mannered posters. You may, in your limited experience, assume that without policing, everybody will simply behave well and make the effort to post in such a way as to make sure our experts don't have to run around putting extra effort in simply to discover what the question is supposed to be. In this you would be quite misguided. If you really have had a look around as you say, you would see this without having to think too deeply.

I will always listen to advice, but your ranting gives no evidence of even appreciating the issues, so you will excuse me if I won't allow myself to be directed by someone who seems clearly intent only on trying to create a smoke-screen so that no-one will look too deeply at their behaviour, and shows no signs of having any wisdom to offer. Perhaps when I see some of your contributions helping people (or even simple attempts to help), then I may review my opinion.

If I put 5 posters off using the site, to save any one of our experts having to deal with the sort of lazy nonsense we get here quite frequently, then I consider that a good job well done. To be perfectly frank, I would be happy to see the back of any and all posters who seem to have that attitude that our experts were put on Earth for the specific purpose of helping them out, without regard to manners or even bothering to express their question clearly enough to be understood without jumping through hoops.

Clearly though, if you feel that you have a valid point and that I am simply too self-involved to see it, then you are welcome to bring this up with other administrator(s) of the site. I'm not above the rules of the site. I can't imagine anyone taking 'this' too seriously though. Can you?
Nov 18 '09 #15
Delerna
1,134 Recognized Expert Top Contributor
As stated, it is not possible to produce the desired effect in a list box.
By desired I mean
I would like the dates that are within 5 days of expiring to show in red text
But there is always more than 1 way to skin a cat.

How about something like this...........just as an idea.
Expand|Select|Wrap|Line Numbers
  1. SELECT   qryTrackingDate.[Employee ID], 
  2.          qryTrackingDate.[Trace Date], 
  3.          DateDiff("d",Date(),[Trace Date]) as DaysRemaining, 
  4.          qryTrackingDate.ELastName, 
  5.          qryTrackingDate.EFirstName 
  6. FROM     qryTrackingDate 
  7. WHERE    (((qryTrackingDate.[Trace Date])>Date())) 
  8. ORDER BY qryTrackingDate.[Trace Date]; 
  9.  
Now the user can see how many days are remaining.
Not quite the same as highlighted red, but still effective


PS
I for one appreciate NeoPa's efforts and certainly do not see that he is bashing you. It really is difficult to get motivated to help someone when they don't even format posted code in a way that makes it readable.
Just take his Good advice onboard for future posts
Thanks Neopa
Nov 18 '09 #16
tuxalot
200 New Member
Thanks Delerna for your post. Your solution achieves the desired effect.

Tux
Nov 18 '09 #17
ChipR
1,287 Recognized Expert Top Contributor
Just curious, but is there any reason to use a listbox over a subform?
Nov 18 '09 #18
tuxalot
200 New Member
No reason Chip, and from your prior post and what I am learning a sub-form may be a more appropriate way to do this. This db was created by another and I'm modifying it and learning Access along the way. I'm reading more about how to replace the listbox with a subform and apply conditional formatting as you mentioned previously.

Thanks for the reply,

Tux
Nov 18 '09 #19
NeoPa
32,557 Recognized Expert Moderator MVP
@Delerna
Thanks Delerna. I appreciate the support :)

Tux,

Although we've all been trying to respond directly to your original question, I think that Chip's ideas are probably more appropriate as a solution for you in the longer term. Well worth your while getting some experience in that area too I would say. You'll probably enjoy the extra scope.
Nov 18 '09 #20
tuxalot
200 New Member
Thanks NeoPa. I'll educate myself a bit here and call in when I get stuck.

Tux
Nov 18 '09 #21
Delerna
1,134 Recognized Expert Top Contributor
I also think the subform is probably the superior option. My post was more about thinking "outside the square"
Nov 19 '09 #22
tuxalot
200 New Member
It's very nice to have options.
Nov 19 '09 #23

Sign in to post your reply or Sign up for a free account.

Similar topics

9
2784
by: Phil G. | last post by:
Hi all, I would like to create a very simple 'lite' version of Outlook Calendar's reminder function. I will use a windows service that will read timedate stamps from a db and compare them to...
2
1778
by: Arnold | last post by:
Greetings Gurus, In a report showing the names of students and their progress, I am getting an error in the name field (Name: #Error). The report gets its data from an unbound form containing...
0
1472
by: Brian Quinlan | last post by:
What's New? =========== The deadline for submitting a talk or tutorial for the Vancouver Python Workshop is fast approaching. Talks will be accepted until Friday June 16th. To submit a talk,...
1
3082
by: Jeremy Simpson | last post by:
Has anyone tried to set a reminder in MS Outlook from with Access? I want to, when a checkbox is ticked automatically set a reminder in access that takes information from the current record i.e...
2
2577
by: ccwells | last post by:
Hi, I am a novice to VB, using Access 2003 on a XP-SP2 platform, and I have a small database for tracking expenses, and want to be able to filter my expense report by date. I currently have a...
2
2524
by: THEAF | last post by:
hi, I'm trying to create a reminder. i have 2 forms one for to set the reminder and one to view all the reminders. these reminders are recorded on access. i can save the reminder and the other form...
1
2270
by: THEAF | last post by:
OK, i've had quite a few problems with this form and again i have another one. i'm using vb6 and access. THIS IS MY FORM LOAD AND AFTER THE LOOP IS WHERE THE REMINDER CODE IS Private Sub...
5
2195
by: THEAF | last post by:
hi, Does anyone know how i can create a task reminder using maybe a few things like modules, listbox, command buttons, textboxes and any other commonly used buttons. And do you know where i can...
0
958
by: Trent Nelson | last post by:
Just a friendly reminder that this weekend is the Python sprint weekend! Look forward to seeing everyone on #python-dev irc.freenode.net over the course of the weekend! Trent. On 16 Apr,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7467
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5594
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
399
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.