Wildcards (?)

  • Thread starter Thread starter an
  • Start date Start date
A

an

Hello!

I have a Table with data field (Date/Time and format Short
Date to dd-mm-aaaa)
I have difficult to construct criteria in query to obtain
all 2004 records writing year only.

In Query/Criteria I tried:
Like "??-??-" & [Choose year] & "####"
but not work...

I need help, please.
Thanks in advance.
an
 
an,

Create a calculated field in your query by inserting the following in the
Field: row of a new column:

ChooseYr: Year([MyDateField])

Change "MyDateField" to the name of your date field.

In the Criteria: row of that column, enter:

[Enter a 4-digit year:]



hth,
 
In an empty column of the grid put
Year([YourField])
and in the criteria row put
[Choose year]
 
Exactly!!!

Many thanks, CF.
an
-----Original Message-----
an,

Create a calculated field in your query by inserting the following in the
Field: row of a new column:

ChooseYr: Year([MyDateField])

Change "MyDateField" to the name of your date field.

In the Criteria: row of that column, enter:

[Enter a 4-digit year:]



hth,

--

Cheryl Fischer, MVP Microsoft Access



Hello!

I have a Table with data field (Date/Time and format Short
Date to dd-mm-aaaa)
I have difficult to construct criteria in query to obtain
all 2004 records writing year only.

In Query/Criteria I tried:
Like "??-??-" & [Choose year] & "####"
but not work...

I need help, please.
Thanks in advance.
an


.
 
Many thanks too
an
-----Original Message-----
In an empty column of the grid put
Year([YourField])
and in the criteria row put
[Choose year]

--
Joan Wild
Microsoft Access MVP
Hello!

I have a Table with data field (Date/Time and format Short
Date to dd-mm-aaaa)
I have difficult to construct criteria in query to obtain
all 2004 records writing year only.

In Query/Criteria I tried:
Like "??-??-" & [Choose year] & "####"
but not work...

I need help, please.
Thanks in advance.
an



.
 
Back
Top