Expressions in a query

  • Thread starter Thread starter Todd
  • Start date Start date
T

Todd

I've got an incrementing number in a form that increases
one number after every record is entered. The increments
start over at 1 every year. I've got an expression in a
field in the form that makes the number appear this way
based on the month and year for every record entered: Here
is the expression: =([numCompanyNumber])&"-"&Format
([submissiondate],"mm")&"-"&Format([submissiondate],"yy"&"-
"&Format([AEID],"0000"). It appears in the form like
this: 23-01-04-0001 - 23(companynumber), 01(month), 04
(year), 0001(first record of that year).

This works good in the form and reports where I have the
expression. My question is how can I use this expression
in a query to search for records with that expression
number format?

I'm using Access2000.

Help!
 
You could use either of these entries in the criteria
field in your query:

Like "##-##-##-####"
Like "*-*-*-*"

These are wildcards. To learn more about wildcards, look
up wildcards in the help file.

TOS



or you could try this:
 
That didn't seem to work. My expression I made is only in
the actual form and not in the underlying table. Is it
possible to put that expression in the table where it can
sort for that actual expression.

If so, please tell me how.
-----Original Message-----
You could use either of these entries in the criteria
field in your query:

Like "##-##-##-####"
Like "*-*-*-*"

These are wildcards. To learn more about wildcards, look
up wildcards in the help file.

TOS



or you could try this:
-----Original Message-----
I've got an incrementing number in a form that increases
one number after every record is entered. The increments
start over at 1 every year. I've got an expression in a
field in the form that makes the number appear this way
based on the month and year for every record entered: Here
is the expression: =([numCompanyNumber])&"-"&Format
([submissiondate],"mm")&"-"&Format ([submissiondate],"yy"&"-
"&Format([AEID],"0000"). It appears in the form like
this: 23-01-04-0001 - 23(companynumber), 01(month), 04
(year), 0001(first record of that year).

This works good in the form and reports where I have the
expression. My question is how can I use this expression
in a query to search for records with that expression
number format?

I'm using Access2000.

Help!
.
.
 
Back
Top