Share via

Ctrl + Semicolon for current date

Anonymous
2014-04-23T23:46:26+00:00

I am distributing an .mde file made with access 2003, and running it with 2007 runtime and/or 2010 runtime. I asked on the boards here and was told that should work fine. I know there will be a few things to work out...here is one:

When testing the app.mde in the 2007 runtime environment, I press Ctrl+;  (semicolon) to enter the date, it gives me the message: 

"The function you entered can't be used in this expression."

I did some searching and found this suggestion:

Open any code module (or open the debug window using Ctrl-G). Select 

Tools | References from the menu bar. Examine all of the checked 

references: uncheck any that have "MISSING:" in front. You should be 

okay after that (although you might have to go back into the references 

and recheck any you unchecked if you really did need them) 

But none of my checked references say MISSING in front.

Thank you for any help.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

7 answers

Sort by: Most helpful
  1. Anonymous
    2014-04-24T22:48:33+00:00

    Glad you got it working, but I'd have been a bit more comfortable going with the newer versions of the .dll files rather than the older.

    But if that's what MS tech support recommended and it works, more power to ya!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2014-04-24T18:57:06+00:00

    Woo hoo!!!!!!!!!!!!! I figured it out for myself!!!!!!!!! Oh happy day!!!!!!!!!!!!

    I put this code in a module:

    Sub ListReferences()

    Dim refCurr As Reference

      For Each refCurr In Application.References

        Debug.Print refCurr.Name & ": " & refCurr.FullPath

      Next

    End Sub

    I ran it with Ctrl-G to open the immediate window.

    I got a list of the references in use.

    I compared these files AND DATES with those on the target computer.

    I found that although the target computer had the files, the dates were more recent.

    I renamed the target files, and copied my earlier versions of those files to the target computer.

    I restarted the target computer.

    MY ERRORS WENT AWAY!

    I got guidance to do this through this article: http://support.microsoft.com/kb/310803

    Thank you Microsoft!

    Was this answer helpful?

    0 comments No comments
  3. ScottGem 68,830 Reputation points Volunteer Moderator
    2014-04-24T18:22:27+00:00

    Hmm, I just tried using Ctrl+; to enter the current date into a date control on an Access 2010 app and it worked fine. So it would appear to be a built in shortcut.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2014-04-24T17:49:53+00:00

    Thank you so much. These are great troubleshooting questions. My replies are in bold:

    Is there any code or macro on the control (or on the form) where you're trying to enter the date?

    No, there is no code on the form at all.

    If you open the VBA error and select Debug... Compile <your project name> do you get any error messages?

    Yes, it compiles without error.

    Do you have error trapping in all of your VBA modules?

    Yes.

    Does the code work with the 2007 production environment but fail only in the runtime? 

    No, it fails in both.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2014-04-24T00:36:41+00:00

    Well, a missing Reference is one possible cause of this error message, but far from the only one. Is there any code or macro on the control (or on the form) where you're trying to enter the date? If you open the VBA error and select Debug... Compile <your project name> do you get any error messages? Do you have error trapping in all of your VBA modules? Does the code work with the 2007 production environment but fail only in the runtime?

    Was this answer helpful?

    0 comments No comments