Solved

ms access query

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

747 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

13 Experts available now in Live!

Get 1:1 Help Now