Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2006

Tip: Looking for answers? Try searching our database.

vba.date issues in 2003 on XP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pubdude2003 - 28 Nov 2006 23:42 GMT
Hey all, I have some code that seems to run fine on some machines but not
others.

It's an mde distributed to a number of machines but they all run 2003, same
build and Jet as the development box.

the code that seems to be choking is

   Dim apptdate2 As Date    
   apptdate2 = Nz(DLookup("Apptdate", "Journalquery"))    
   If apptdate2 = date Then

gives me a

3075 function is not available in expression in query expression'(((Journal.
ApptDate)=Date()))

another form with code

   If expiry - VBA.date < 15 Then

works fine and we have already tried

   If apptdate2 = VBA.date Then

but it just won't work

any ideas would sure be appreciated...
Allen Browne - 29 Nov 2006 02:29 GMT
The error message indicates that the problem is with an expression in the
query. That could be due to sandbox mode on some computers.

More info about the function calls that could trigger this in the last
section of this kb:
   http://support.microsoft.com/kb/239482

Signature

Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hey all, I have some code that seems to run fine on some machines but not
> others.
[quoted text clipped - 26 lines]
>
> any ideas would sure be appreciated...
pubdude2003 - 29 Nov 2006 15:33 GMT
thanks Allen, perhaps I could prevail upon you to vet this code

it works using Terry and Dev's terrific API call

?fReturnRegKeyValue(HKEY_LOCAL_MACHINE, _
   "\SOFTWARE\Microsoft\Jet\4#\Engines\SandBoxMode","sand")

Keeps giving me
Error: Key or Value Not Found.

I have been ruminating on it for almost an hour now and it just isn't coming
to me
Allen Browne - 29 Nov 2006 15:47 GMT
Presumably you are talking about this code:
   http://www.mvps.org/access/api/api0015.htm

I haven't used that enough to comment. The path looks correct in the
registry, although it is 4.0. (The 4# looks like what VBA does for a
double.)

Signature

Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> thanks Allen, perhaps I could prevail upon you to vet this code
>
[quoted text clipped - 9 lines]
> coming
> to me
pubdude2003 - 29 Nov 2006 16:12 GMT
thanks Allen....

any one else have a notion about this?
pubdude2003 - 29 Nov 2006 16:53 GMT
Actually please scratch my last response, we appear to be barking up the
wrong tree.

I just changed the SandBoxMode value to 3 on the development machine and it
runs the mde without a complaint so it appears to be unrelated to that
setting.

So I guess back to the original question, why an mde runs perfectly well on
about 12 computers but chokes on that simple expression on 2. All running
2003 on XP boxes same Jet.

Any thoughts?
David W. Fenton - 29 Nov 2006 23:16 GMT
> So I guess back to the original question, why an mde runs
> perfectly well on about 12 computers but chokes on that simple
> expression on 2. All running 2003 on XP boxes same Jet.

Have you checked the Jet versions?

Signature

David W. Fenton                  http://www.dfenton.com/
usenet at dfenton dot com    http://www.dfenton.com/DFA/

pubdude2003 - 02 Dec 2006 16:11 GMT
Thanks Dave, yeah, it was the second thing we checked. The only thing we can
think is that it's conflicting with some other code doing the same thing in
an on focus or on current event. We rem'ed it out in on open and it seemed to
fix the problem.

I am guessing certain slower boxes run the code just a tad slower than newer
boxes and cause a conflict....

Anyway the issue is resolved, thanks for all your responses guys.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.