Solved

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

Posted on 2014-09-24
2
671 Views
Last Modified: 2014-09-24
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
Comment
Question by:Brook_Lane
2 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 40342564
try

= date() - 1+ #7:00:00 AM#
0
 

Author Closing Comment

by:Brook_Lane
ID: 40342575
That's exactly what I needed.. thank you! I can't believe how quickly you replied too!
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)

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
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

14 Experts available now in Live!

Get 1:1 Help Now