Solved

ms access query

Posted on 2016-09-08
5
40 Views
Last Modified: 2016-09-08
Hi,

1. I'm trying set function between 'Start Date' and 'Finish Date'(with time) in query and it works fine:
between #01/09/2016 13:00:05# and #05/09/2016 21:11:30#

2. now I required to enter date. And function below works fine
between [Enter the Start Date:] and [Enter the Finish Date:]

3. How to enter date by setting specific default time?
I tried something like this and doesn't works for me...

between (DateValue([Enter the StartDate:]) & TimeValue("13:00:05")) And #05/09/2016 21:11:30#

between (Format([Enter the Start Date:],"dd/mm/yyyy") & "13:00:05") And (Format([Enter the Finish Date:],"dd/mm/yyyy") & "21:11:30")

Can you advise on this please...

Thanks
0
Comment
Question by:Darius
  • 2
  • 2
5 Comments
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 41789708
It could be:

Between DateValue([Enter the StartDate:]) + TimeSerial(13, 0, 5) And DateSerial(2016, 9, 5) + TimeSerial(21, 11, 30)

/gustav
1
 

Author Comment

by:Darius
ID: 41789732
Thank you very much! This is exactly what I need and it's works....
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 41789747
You are welcome!

/gustav
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 41789789
You original syntax would have worked too if you had used the + operator instead of the ampersand.
DateValue([Enter the StartDate:]) + TimeValue("13:00:05")

Ron
1
 

Author Comment

by:Darius
ID: 41789804
Perfect it's works as well, thank you
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL profiler equivalent in MS-Access 3 42
Access Query based on a Form Field 2 15
Format a Field AFTER UPDATE 5 26
Access coding 2 0
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now