Solved

ms access query

Posted on 2016-09-08
5
48 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 51

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 51

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

630 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