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 / Queries / August 2007

Tip: Looking for answers? Try searching our database.

Dcount revisted

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
davidstevans@gmail.com - 31 Aug 2007 16:32 GMT
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!!
Marshall Barton - 31 Aug 2007 17:43 GMT
>Thanks for all your help guys, this dcount has me stumped. Here is
>another query I am having trouble with.
[quoted text clipped - 9 lines]
>=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*")

Signature

Marsh
MVP [MS Access]

davidstevans@gmail.com - 31 Aug 2007 17:52 GMT
> davidstev...@gmail.com wrote:
> >Thanks for all your help guys, this dcount has me stumped. Here is
[quoted text clipped - 19 lines]
> Marsh
> MVP [MS Access]

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

" the expression you entered contains invalid syntax"

please review and update,

thanks
John Spencer - 31 Aug 2007 18:57 GMT
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*' ")

Signature

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

>> davidstev...@gmail.com wrote:
>> >Thanks for all your help guys, this dcount has me stumped. Here is
[quoted text clipped - 27 lines]
>
> thanks
Marshall Barton - 31 Aug 2007 20:27 GMT
>I think Marshall meant
>=DCount("*", "my_data", "Current Like ""714*""")
[quoted text clipped - 4 lines]
>=DCount("*", "my_data", "Current Like '714*' ")
>        / DCount("*", "my_data", "Current Not Like '714*' ")

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

Thanks John

Signature

Marsh
MVP [MS Access]

 
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.