473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Date on a report or form

46
I am new to Access and was hoping someone could help me with a question. On a report or form you can place "=Date()" in a text box to display the current date, is there a way to have it display the dates of the current week, Sunday - Saturday?

thanks,
Jeff
Mar 20 '08 #1
9 1559
debasisdas
8,127 Expert 4TB
Hi Jeff

Welcome to TheScripts family.

Feel free to post questions in the related forum only by choosing from under the blue bar on the top of your page.

Please follow the posting guidelines in every new post/reply.

Please specify your post/question clearly.Please use proper code tags in all your codes.

Regards
Debasis
Mar 20 '08 #2
grays
1
I am new to Access and was hoping someone could help me with a question. On a report or form you can place "=Date()" in a text box to display the current date, is there a way to have it display the dates of the current week, Sunday - Saturday?

thanks,
Jeff
try this...

=Date()-Weekday(Date())+3

this will give you tuesday of the current week
Wed +4
Thur +5
Fri +6
Next Mon +9
Mar 21 '08 #3
missinglinq
3,532 Expert 2GB
For the start and ending dates of the week:

Expand|Select|Wrap|Line Numbers
  1. Date() - (Weekday(Date()) - 1) & " - " & Date() - Weekday(Date()) + 7
Welcome to TheScripts!

Linq ;0)>
Mar 21 '08 #4
jmar93
46
Thanks for the replies, works great. Just the help I needed.

thanks again,

Jeff
Mar 22 '08 #5
missinglinq
3,532 Expert 2GB
Glad we could help!

Linq ;0)>
Mar 23 '08 #6
jmar93
46
For the start and ending dates of the week:

Expand|Select|Wrap|Line Numbers
  1. Date() - (Weekday(Date()) - 1) & " - " & Date() - Weekday(Date()) + 7
Welcome to TheScripts!

Linq ;0)>
How would I write this to display the dates of the current month or the previous month?

thanks,
Jeff
May 3 '08 #7
missinglinq
3,532 Expert 2GB
If you mean the first and last of the current month and first and last of the previous month:

'First of the current month
DateSerial(Year(Date), Month(Date), 1)

'Last of the current month
DateSerial(Year(Date), Month(Date) + 1, 0)

'First of the previous month
DateSerial(Year(Date), Month(Date) - 1, 1)

'Last of the previous month
DateSerial(Year(Date), Month(Date), 0)

Linq ;0)>
May 4 '08 #8
jmar93
46
If you mean the first and last of the current month and first and last of the previous month:

'First of the current month
DateSerial(Year(Date), Month(Date), 1)

'Last of the current month
DateSerial(Year(Date), Month(Date) + 1, 0)

'First of the previous month
DateSerial(Year(Date), Month(Date) - 1, 1)

'Last of the previous month
DateSerial(Year(Date), Month(Date), 0)

Linq ;0)>
Works perfectly.

Thank you,

Jeff
May 5 '08 #9
missinglinq
3,532 Expert 2GB
Glad we coul help again!

Linq ;0)>
May 5 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Greg Iocco | last post by:
Simple problem, but I've checked the newsgroups and couldn't find an answer. On the main swithboard is a command button to open a report. The report I built is based off a query, and the query...
5
by: Michelle | last post by:
Hi all I have a report which displays staff absences. An absence record has a start and end date and the type of absence, ie sickness, annual leave. I have created a form which allows the...
2
by: Rene | last post by:
I have a master "attendance" report that also has two "attendance" sub-reports...each collecting data from a different group...and totaling those present at the end. I chose sub-reports because...
3
by: manning_news | last post by:
Using A2K. I've been asked to modify a report currently requiring only one date parameter to now accept a date range. The main report has 2 subreports and is not bound to a table or query. The...
8
by: nishkrish | last post by:
Hi, I am new to access I created the form and report from Allen Browne's Frmwhat Date the way he has described but when i preview report it shows StartDate: name? Enddate: name? am i suppose...
2
by: keithsimpson3973 | last post by:
I have a program built in Visual Basic 6. It uses an Access 2003 database. My report selection form in vb6 has 2 date pickers for start date and end date. The report is an Access report. When the...
7
by: creative1 | last post by:
Hello everyone. I am experiencing a strange problem that I can't fix on my own. I think I need expert's suggestions for this. The problem is: I want to print account statement (or any other...
3
by: kmnotes04 | last post by:
Could anyone tell me how to restrict the date range for items that appear on a report? Old items from previous years appear on the report. I was asked to have only this year's items (and beyond)...
3
by: Fred's | last post by:
Hi Folks, I have a report which the record source is a query name: Query3 and in my Query3 I have this parameter "between And ". Therefore, when I open my report, it will ask for a Start Date...
12
smithj14
by: smithj14 | last post by:
I have a form to enter start and end dates then select a worker name to filter a report. This all works fine and when the report is open in preview mode it shows the date range in the txtboxes on the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.