query criteria format

  • Thread starter Thread starter ryan.fitzpatrick3
  • Start date Start date
R

ryan.fitzpatrick3

In a query field criteria line, the results when I run the query show
1, I want it to pull 01, do I put ## in the criteria line in the
format under properties?

Ryan
 
Criteria does not chage the data format. If your data is numerical then it
will not have a leading zero. If it is text with leading zero then your
criteria must match to pull the record or use a wildcard.
A wildcard can be multiple character or single character - asterisk for
multiple and question mark for single. When you use the question mark there
must be a character in that position. For asterisk there may be many or none.

Use Format([YourField], "00") to display a zero in front of single digit
text.
 
Is that for VBA?


Criteria does not chage the data format. If your data is numerical then it
will not have a leading zero. If it is text with leading zero then your
criteria must match to pull the record or use a wildcard.
A wildcard can be multiple character or single character - asterisk for
multiple and question mark for single. When you use the question mark there
must be a character in that position. For asterisk there may be many or none.

Use Format([YourField], "00") to display a zero in front of single digit
text.
--
KARL DEWEY
Build a little - Test a little

In a query field criteria line, the results when I run the query show
1, I want it to pull 01, do I put ## in the criteria line in the
format under properties?
 
No, Format is an Access function.
From online help --
Format function
Applies to
Microsoft Office Access 2003

Click the following link to see a topic that gives detailed information
about how to reference the function. Note that the link will take you to the
Microsoft Developer Network (MSDN) Web site.

--
KARL DEWEY
Build a little - Test a little


Is that for VBA?


Criteria does not chage the data format. If your data is numerical then it
will not have a leading zero. If it is text with leading zero then your
criteria must match to pull the record or use a wildcard.
A wildcard can be multiple character or single character - asterisk for
multiple and question mark for single. When you use the question mark there
must be a character in that position. For asterisk there may be many or none.

Use Format([YourField], "00") to display a zero in front of single digit
text.
--
KARL DEWEY
Build a little - Test a little

In a query field criteria line, the results when I run the query show
1, I want it to pull 01, do I put ## in the criteria line in the
format under properties?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top