Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 836
  • Last Modified:

In Access 2010 how can a text box default value equal todays date and a specific time?

I have an Access 2010 database with a form containing two unbound text boxes. I'm referencing the two unbound text boxes to specify from and through date/time criteria for a query. I'm trying to find a way to have the default value of the "from" text box to be yesterday's date at 7AM (Example: "9/23/2014 07:00:00 AM") and the through text box to have a default value of today's date in the same format. If I use the functions "=date()-1" and "=date()" as default values I get the dates I need, but I can't seem to find a way to get the 7AM time to appear. I tried using "=date()-1 " 07:00:00 AM"" but that just generates #type! error.
0
Brook_Lane
Asked:
Brook_Lane
1 Solution
 
Rey Obrero (Capricorn1)Commented:
try

= date() - 1+ #7:00:00 AM#
0
 
Brook_LaneAuthor Commented:
That's exactly what I needed.. thank you! I can't believe how quickly you replied too!
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now