Query Format

  • Thread starter Thread starter DavidW
  • Start date Start date
D

DavidW

Is there a way to change the format of
Expr1: Month(usage!pumpda)
in a query to recognize the normal January,February,etc. instead of
1,2,3,4,5,6,etc.
I am wanting to change my combobox to month letters instead of numbers. The
combo is using stored info for the search criteria. This does give the end
results that I wanted.
I am assuming this is on account of the way that the date is stored in the
table, it is a short date like 5/12/2003.
Any ideals would be appreciated
Thanks
David
 
DavidW said:
Is there a way to change the format of
Expr1: Month(usage!pumpda)
in a query to recognize the normal January,February,etc. instead of
1,2,3,4,5,6,etc.
I am wanting to change my combobox to month letters instead of numbers. The
combo is using stored info for the search criteria. This does give the end
results that I wanted.
I am assuming this is on account of the way that the date is stored in the
table, it is a short date like 5/12/2003.
Any ideals would be appreciated

Format(usage!pumpda, "mmmm")
 
DavidW said:
Is there a way to change the format of
Expr1: Month(usage!pumpda)
in a query to recognize the normal January,February,etc. instead of
1,2,3,4,5,6,etc.
I am wanting to change my combobox to month letters instead of numbers. The
combo is using stored info for the search criteria. This does give the end
results that I wanted.
I am assuming this is on account of the way that the date is stored in the
table, it is a short date like 5/12/2003.

You probably want the combo box to display the name of the
months, but use the month number behind the scenes. If so,
Set the combo's Row Source query to provide both:

SELECT Month(pumpda) AS MonNum,
Format(pumpda, "mmmm") AS MonName
FROM pumpdatable
ORDER BY 1

Then set the combo's ColumnCount to 2, ColumnWidths to 0;
and BoundColumn to 1.
 
Back
Top