473,902 Members | 3,399 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date() function in MS Access 2010

twinnyfo
3,653 Recognized Expert Moderator Specialist
Hey coders,

Has anyone heard anything about the Date() function no longer working (or working differently in MS Access 2010? I have an MS Access 2007 DB that has worked perfectly, however, we have a bunch of machines running on the same front end, and the machine with MS Access 2010 generates an error that the function cannot be found in the line of code that uses that function.

Any ideas?

This is the line of the query that generates the error:

Expand|Select|Wrap|Line Numbers
  1. (((tblProjects.ReleaseDate)<=Date()-60) AND ((Sum(IIf([Status]=4,0,1)))=0))
  2.  
Aug 28 '12
17 12428
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
I would also suggest decompiling/recompiling if you have not allready tried that.
Aug 29 '12 #11
twinnyfo
3,653 Recognized Expert Moderator Specialist
NeoPa, since I only have one machine using 2010, conversion to 2010 is not my main concern right now. It will be whenever the rest of our machine do the switch (DoD snail's pace upgrades).

So, here is what I did: I created a completely new blank database and imported all objects into the db and relinked all external tables. Thanks to Smiley, I was able to fix any broken queries that weren't seeing properly because of the transfer, since some queries were dependent on others. Debugged, no errors, copied FE to the new 2010 machine and the thing works like a charm!

Yes, MS Access does, in fact, have a mind of its own.

Seth, thanks for the tip. I've actually had to do this in the past with other dbs that just "stopped working". Yet another "tool" for my kit.......

Thanks all!
Aug 29 '12 #12
Seth Schrock
2,965 Recognized Expert Specialist
It was one of the most frustrating things that I have had to deal with because I knew that it had been working the day before and I knew I had the syntax correct, but it just stopped working. I couldn't find anything online to help me, so I just started copying things over one at a time waiting for it to break and it never did. I then tried copying everything in groups and it still worked.

Anyway, glad it worked for you.
Aug 29 '12 #13
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
While the suggestion by Seth is good and valid I would usually try and decompile/recompile first, since there is alot of information that can't be imported into a new database, like startupform and other settings.
Aug 29 '12 #14
twinnyfo
3,653 Recognized Expert Moderator Specialist
Smiley,

Yes, I recompile just prior to every publication of changes.

I agree that Seth's "solution" is more of a workaround than anything else. However, for those who come across similar quirks, I thought it wise to list it as a possible workaround.
Aug 30 '12 #15
NeoPa
32,584 Recognized Expert Moderator MVP
I'm not aware of a decompile option Smiley. Is that something we should know about?

Twinny, A very basic workaround, but nevertheless what the OP found most helpful in this situation and others may too. That's the main point of the 'Best Answer' so I'm happy to leave it that way (Believe me - I'd reset it if I felt it had no value).

Of course, that never means that it's pointless to try other approaches, nor that any other suggestions were wasted. Most of these threads are read thousands of times by different people so what suits the OP may not suit all others. Every sensible suggestion can prove very helpful.
Aug 30 '12 #16
TheSmileyCoder
2,322 Recognized Expert Moderator Top Contributor
NeoPa:
I'm not aware of a decompile option Smiley. Is that something we should know about?
I dont want to clutter up this thread more, and the information might be usefull in other situations so I wrote up a article, which can be found here:
How to Decompile an Access Application Or How to do a Full Fresh Compile
Aug 30 '12 #17
NeoPa
32,584 Recognized Expert Moderator MVP
Smiley:
I dont want to clutter up this thread more, and the information might be usefull in other situations so I wrote up a article, which can be found ...
Perfectly handled :-)

Thanks for that. I've added the link to my database as it should prove very handy. I think I'll try that on my current project tomorrow, but I won't go into that here ;-)
Aug 31 '12 #18

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1945
by: Christine | last post by:
I am having the strangest problem. I use the Date function in several of my forms and modules in an Access 2000 mdb. Lately, wherever in my code (in this one mdb) I use the Date function, it changes to date (lower case vs proper case). I can fix this very temporarily by reconstructing the database (importing all objects to a new mdb) or using the decomplie option to open it. But in either case, once I compile it reverts back to lower case....
3
4425
by: murch.alexander | last post by:
I made a simple public function to set and return a date value (see below). I have a number of queries that call up the function to get the "As Of Date," which is typically set to today's date. Occasionally though, I need to change the "As Of Date" to some date in the past, and then when I run the queries, they're based on that date in the past. This generally works fine, but, sometimes, the date gets reset to something WAY in the past...
1
4589
by: phill86 | last post by:
Hi, I have an access 2010 database that I want to convert to an SQL Server database and I need to know if the data macros in access will still work in the SQL database or will i have to create triggers in the SQL Sever database Many Thanks Phill
5
12437
by: jaad | last post by:
Hello, I have a database that was written in access 2007 on my pc. I wanted to work off site with the database so I uploaded it onto my laptop which is loaded with access 2010 beta. When I finished working with the database and return it to my pc(which has access 2007) I can't get it open because Access say that the file is not the right format. Does anyone have a way to work around this compatibility problem? So you know I...
2
6720
by: sierra7 | last post by:
It seems Access 2010 is associating an 'input mask' or field type with a combo box when a form is opened, even though there is no Format setting on the control. I have a form which has been running OK for years in Access 2003; it adds an item selected from an inventory listing to either an existing Sales Order or Purchase Order. For historic reasons Purchase orders are alphanumeric and Sales orders are numeric (long integer). The RowSource...
1
2702
by: zolamdlankomo | last post by:
(SMALLDATETIME,GETDATE(),20) ...i want the date to be 2010-02-02. wen i run the statement above it gives mt todays dat bt i want 2010-02-02
2
7201
by: dougancil | last post by:
I have a user who had deleted some records from a database today using Access 2010. They have an ID field that's autonumbered. They have No Duplicates allowed. When they created a new record today, it was recreating numbers that had already been assigned but deleted. I've read a couple of articles about resetting the autonumber in Access, but I'm wondering if this is the only way to really fix this issue? Has anyone else came up with a work...
1
5274
by: Alan Yim | last post by:
Hi folks, My company recently upgraded our Office suite from 2003 to 2010. The problem in particular is with an Access database that was originally designed in Access 2003. The code in question used work in 2003 (see below code). Private Sub engSave_Click() Dim strSql3 As String 'Archive order number and cost data for engine.
2
7336
by: Bill Boord | last post by:
I need to be able to shut off the AutoCorrect "feature" within Access 2010 code. I have utilized Application.SetOption with method strings for other startup requirements, but I cannot seem to find a correct method string to turn off the text replace "feature." I am not talking about the "Track Name AutoCorrect Info" method, but rather the method that corresponds to the checkbox if one were to enter Access 2010 and click File, Options,...
1
8505
dsatino
by: dsatino | last post by:
I have numerous applications built in Access 2000/2003 that all use ODBCdirect workspaces to access various non-Access databases. Unfortunately, ODBCdirect is 'no longer supported'in Access 2010 and when my associates get new PC's, the applications fail. The error message says to switch from DAO to ADO. This is a little curious since ADO is dying/dead as well. I'm hoping someone can add a little insight/best practice to my situation.
0
9845
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11279
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10499
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9675
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7205
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4307
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3323
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.