Condition in MACRO

G

Guest

I have been using this condition in Access2000 for years, no problem.
DCount("*","OrderHeader")>0
Yet when I copy this in an Access2003 macro I get this message:

Microsoft Office Access can't parse the
expression:'DCount("*","OrderHeader")>0'.

OrderHeader is a valid tablename.

What's wrong with the syntax or can there be another reason for this message?

Thanks for your response!
 
S

Steve Schapel

Roadking,

I can't think of a reason for the error. Did you copy/paste this
expression from somewhere else? If so, delete it and manually type it
in. Sorry, but I have to ask... Are you sure you have this expression
in the Condition column of the macro design? Then, clutching at straws,
make a mew macro and test the same condition in there, see if you get
the same thing.
 
G

Guest

Thanks for answering me, Steve.
I did as you said, typed in the expression and made
a new macro.
The result was in both cases the same error.
I have some screen shots, to show that I'm using the Condition column,
but I don't see how I can attach them to this post.

Although I fail to see how this has anything to do with it, I'm working in an
Access2003 database on a remote XP computer, connected via a VPN (Europe).
 
S

Steve Schapel

Roadking,

I am sorry, I am at a loss to explain this. It appears that you have
done it correctly. All I can suggest is some experimentation, to try
and identify where the error is arising.

Can you make a new Access 2003 file, and try the same thing there?

Can you try by substituting the name of one of the fields in the query
for the * in other words something like this:
DCount("[NameOfAField]","OrderHeader")>0

Also, have a look at this... open the VB Editor window, and select
References from the Tools menu, and see if any of the ticked items shows
with the word "MISSING".
 
G

Guest

Steve,

I did everything you suggested, same error.
Nothing is missing in the references.
Just to make sure, I asked them to check for updates.
Everything was up to date.
Next step is a new installation, I think.


Steve Schapel said:
Roadking,

I am sorry, I am at a loss to explain this. It appears that you have
done it correctly. All I can suggest is some experimentation, to try
and identify where the error is arising.

Can you make a new Access 2003 file, and try the same thing there?

Can you try by substituting the name of one of the fields in the query
for the * in other words something like this:
DCount("[NameOfAField]","OrderHeader")>0

Also, have a look at this... open the VB Editor window, and select
References from the Tools menu, and see if any of the ticked items shows
with the word "MISSING".

--
Steve Schapel, Microsoft Access MVP
Thanks for answering me, Steve.
I did as you said, typed in the expression and made
a new macro.
The result was in both cases the same error.
I have some screen shots, to show that I'm using the Condition column,
but I don't see how I can attach them to this post.

Although I fail to see how this has anything to do with it, I'm working in an
Access2003 database on a remote XP computer, connected via a VPN (Europe).
 
S

Steve Schapel

Roadking,

Your comment just triggered a random thought... You don't happen to
have a foreign version of Access 2003 installed there do you? In which
case, depending on language, it could be that it requires a ; rather
than a , delimiter in the function arguments, i.e.
DCount("*";"OrderHeader")>0
 
D

Douglas J. Steele

Isn't that a function of what shows up as the List Separator in Regional
Settings (on the Numbers tab), rather than being due to a "foreign version"
of Access?
 
S

Steve Schapel

Thanks, Doug. I hadn't realised that, but seems obvious now that you
mention it. :)
 
G

Guest

Those darn Europeans with their funny List Separators !
Yes, Steve this was exactly the problem. Thanks for
your help.
 

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