vba.date issues in 2003 on XP

  • Thread starter pubdude2003 via AccessMonster.com
  • Start date
P

pubdude2003 via AccessMonster.com

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...
 
P

pubdude2003 via AccessMonster.com

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
 
P

pubdude2003 via AccessMonster.com

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?
 
D

David W. Fenton

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?
 
P

pubdude2003 via AccessMonster.com

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top