Date in the text format.

  • Thread starter Thread starter MN
  • Start date Start date
M

MN

Hi, I have a table name "transfer_Form1" with:
ses_mm (text,2) month field, ses_yy (text,4) year field
I have a form let the user enter From date : MM/YYYY To date MM/YYYY
How I setup a report to display from date and To date to the report.
Here is my query: (but not working well :-(( )
SELECT ([Transfer_form1].[ses_mm]+"/"+[Transfer_form1].[ses_yy]) AS Date1
FROM Transfer_form1
WHERE Date1 Between (forms!FrmReport!FrYear) And (forms!FrmReport!ToYear);
Thank you for any advise!
 
Hi, I have a table name "transfer_Form1" with:
ses_mm (text,2) month field, ses_yy (text,4) year field
I have a form let the user enter From date : MM/YYYY To date MM/YYYY
How I setup a report to display from date and To date to the report.
Here is my query: (but not working well :-(( )
SELECT ([Transfer_form1].[ses_mm]+"/"+[Transfer_form1].[ses_yy]) AS Date1
FROM Transfer_form1
WHERE Date1 Between (forms!FrmReport!FrYear) And (forms!FrmReport!ToYear);
Thank you for any advise!

To display the parameter dates in the report, add an unbound text
control to the report header.
Set it's control source to:
="For sales between " & forms!FrmReport!FrYear & " And " &
forms!FrmReport!ToYear

The form must remain open when the report is run.

I have no idea what you are attempting to do with this line ...
([Transfer_form1].[ses_mm]+"/"+[Transfer_form1].[ses_yy]) AS Date1
 
Thanks Fredg,
But it come out :For Sale report between 0109 and 0609 (instead of 01/09 and
06/09)
I still think how can I add "/" between ?
I have no idea what you are attempting to do with this line ...
([Transfer_form1].[ses_mm]+"/"+[Transfer_form1].[ses_yy]) AS Date1
Because ses_mm and ses_yy they are text field so I want to change the format
to mm/yyyy to plug in the report "detail" not in the header (may be I am
wrong!)
MN

fredg said:
Hi, I have a table name "transfer_Form1" with:
ses_mm (text,2) month field, ses_yy (text,4) year field
I have a form let the user enter From date : MM/YYYY To date MM/YYYY
How I setup a report to display from date and To date to the report.
Here is my query: (but not working well :-(( )
SELECT ([Transfer_form1].[ses_mm]+"/"+[Transfer_form1].[ses_yy]) AS Date1
FROM Transfer_form1
WHERE Date1 Between (forms!FrmReport!FrYear) And (forms!FrmReport!ToYear);
Thank you for any advise!

To display the parameter dates in the report, add an unbound text
control to the report header.
Set it's control source to:
="For sales between " & forms!FrmReport!FrYear & " And " &
forms!FrmReport!ToYear

The form must remain open when the report is run.

I have no idea what you are attempting to do with this line ...
([Transfer_form1].[ses_mm]+"/"+[Transfer_form1].[ses_yy]) AS Date1
 
Back
Top