Flagging today in Access 2010 (1 Viewer)

Mhelp

Registered User.
Local time
Today, 15:53
Joined
May 19, 2014
Messages
16
I have a table with several (many) variables showing different dates.

Is it possible to create a new variable that indicates whether one of the other variable containing today's date? How do I do it?

If the above is possible, it is also possible to search for today + 1 and 2 days (we have a few weekend dates, but would like to have them marked on Fridays).

And another question, you can mark a single line with a color? When I try to color a single line, I color the entire table.

And is it possible to make the top field higher?
 

Beetle

Duly Registered Boozer
Local time
Today, 16:53
Joined
Apr 30, 2011
Messages
1,808
First, I can't be sure, but it sounds like you are working directly in the table. If that's the case, you shouldn't be. Tables are for data storage only. User Interface functionality is handled at the query, form and report level. To answer your question in a general sense, yes, there are several Access functions designed for working with date values. For example;

The Date function will return the current date.

The DateAdd function can be used to add or subtract values from a given date.

The DateSerial function can be used to determine date values (i.e. future or past dates) based on date criteria.

You can find more info about these functions in Access help. However, like I said, this would be done at the query, form and report level. There is very little you can do at the table level in regards to date values. To answer your question more specifically, we would need more information.
 

Mhelp

Registered User.
Local time
Today, 15:53
Joined
May 19, 2014
Messages
16
I will try to explain a little more.

We have a date (Date 1) for the day the person is entered into the database.
Further I have made several queries to calculate the date coming 2-3-4 etc. week after Date 1. Which are called Date 2, Date 3 etc.

On these dates we want to contact the person. And I was thinking it might be possible to make a new varible (contact) (TRUE/FALSE), that showes if Date 2, Date 3 ect. is the date of today by making a query.

I have tried:
IIf(Date()=Date 2 ;"true";"false")
- it works

when I write
IIf(Date()=Date 2 OR Date 3;"true";"false")
it does Not work
 
Last edited:

Beetle

Duly Registered Boozer
Local time
Today, 16:53
Joined
Apr 30, 2011
Messages
1,808
Having fields like Date2, Date3, etc. may be an indication of an incorrect structure. However, to answer your question, your last statement would need to be written like;

IIf(Date()=[Date 2] OR Date()=[Date 3];"true";"false")

BTW - having spaces in your field names is not good practice.
 

Users who are viewing this thread

Top Bottom