Solved Add Start Date and End Date to Report Header as a Subtitle (1 Viewer)

Local time
Today, 13:21
Joined
Aug 19, 2021
Messages
212
Hi. Sorry, better yet, try this one.
Code:
=Format([Enter Start Date], "d mmm yyyy")
1632505860642.png


Done Thank you so much dear.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:21
Joined
Feb 19, 2002
Messages
43,233
s there any way to 1-Jan-2021?
Please stop using a prompt and switch to a control on the form. Format the control to whatever date format you want. Access will pop up a date picker and it will only accept a valid date. Same for the control on the report. Give it whatever date format you want.
 
Local time
Today, 13:21
Joined
Aug 19, 2021
Messages
212
Please stop using a prompt and switch to a control on the form. Format the control to whatever date format you want. Access will pop up a date picker and it will only accept a valid date. Same for the control on the report. Give it whatever date format you want.
Sorry I am beginner I dont have Idea that how to use control on the form for this purpose. Can you explain by screenshots or some more details about it. Sorry if I am bothering you.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:21
Joined
Feb 19, 2002
Messages
43,233
Create two unbound controls on a form. Name them FromDT and ThruDT. Set the control's Format property to Short Date. Then in the query, instead of the prompt, use

Where ExpenseDT Between Forms!yourformname!FromDT AND Forms!yourform!ThruDT

Using form field references also allows you to validate the date entries before opening the report should you want to but at least telling Access that the controls are dates by setting the format property, Access will ensure that the values re at least valid dates. They may make no sense but they will be dates.
 
Local time
Today, 13:21
Joined
Aug 19, 2021
Messages
212
Create two unbound controls on a form. Name them FromDT and ThruDT. Set the control's Format property to Short Date. Then in the query, instead of the prompt, use

Where ExpenseDT Between Forms!yourformname!FromDT AND Forms!yourform!ThruDT

Using form field references also allows you to validate the date entries before opening the report should you want to but at least telling Access that the controls are dates by setting the format property, Access will ensure that the values re at least valid dates. They may make no sense but they will be dates.
Thank you very much.
I've Created a new form DateRangeF
1632636312857.png

2 Unbound boxes
1632636363456.png

Names FromDT and ThruDT and Format Property Short Date

1632636470849.png
1632636959007.png

But I have 2 Questions
In my case what is ExpenseDT?
and where should I put the following statement?
Code:
Where ExpenseDT Between Forms!DateRangeF!FromDT AND Forms!DateRangeF!ThruDT
 
Last edited:
Local time
Today, 13:21
Joined
Aug 19, 2021
Messages
212
Create two unbound controls on a form. Name them FromDT and ThruDT. Set the control's Format property to Short Date. Then in the query, instead of the prompt, use

Where ExpenseDT Between Forms!yourformname!FromDT AND Forms!yourform!ThruDT

Using form field references also allows you to validate the date entries before opening the report should you want to but at least telling Access that the controls are dates by setting the format property, Access will ensure that the values re at least valid dates. They may make no sense but they will be dates.
???
 

Users who are viewing this thread

Top Bottom