Solved

ms access query

Posted on 2016-09-08
5
47 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 50

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 50

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

739 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