Dcount revisted

D

davidstevans

Thanks for all your help guys, this dcount has me stumped. Here is
another query I am having trouble with.

Here is the SQL, this works great:

=SELECT Count(IIf(Current Like "714*",1,Null))/Count(IIf(Current Not
Like "714*",1,Null)) AS result
FROM my_data

Here is the dcount statement that I tried.

=DCount("IIf(Current Like "714*",1,Null))/dCount(IIf(Current Not Like
"714*",1,Null))" ,my_data


thanks I am so sorry to ask for help again!!
 
M

Marshall Barton

Thanks for all your help guys, this dcount has me stumped. Here is
another query I am having trouble with.

Here is the SQL, this works great:

=SELECT Count(IIf(Current Like "714*",1,Null))/Count(IIf(Current Not
Like "714*",1,Null)) AS result
FROM my_data

Here is the dcount statement that I tried.

=DCount("IIf(Current Like "714*",1,Null))/dCount(IIf(Current Not Like
"714*",1,Null))" ,my_data


Try something like:

=DCount("*", "my_data", "Current Like "714*")
/ DCount("*", "my_data", "Not Current Like "714*")
 
D

davidstevans

Try something like:

=DCount("*", "my_data", "Current Like "714*")
/ DCount("*", "my_data", "Not Current Like "714*")

thanks again, when I enter this dcount statement I get the error

" the expression you entered contains invalid syntax"

please review and update,

thanks
 
J

John Spencer

I think Marshall meant
=DCount("*", "my_data", "Current Like ""714*""")
/ DCount("*", "my_data", "Current Not Like ""714*""")

or using single quotes (apostrophes)

=DCount("*", "my_data", "Current Like '714*' ")
/ DCount("*", "my_data", "Current Not Like '714*' ")

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
M

Marshall Barton

John said:
I think Marshall meant
=DCount("*", "my_data", "Current Like ""714*""")
/ DCount("*", "my_data", "Current Not Like ""714*""")

or using single quotes (apostrophes)

=DCount("*", "my_data", "Current Like '714*' ")
/ DCount("*", "my_data", "Current Not Like '714*' ")


And I just posted an explanation about quoted quotes :-(

Thanks John
 

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