Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dcount - string problem 1

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
584
GB
Hello I am having trouble getting my syntax right - please could someone have a look

Code:
=DCount("[ChkApp_ID]","tbl_CheckList_Applicant"," ([ChkApp_App_ID_Link]=& me.[app_id]) AND [ChkApp_Check]='no'")

Many thanks Mark
 
Code:
Dim strFilter As String

strFilter = "ChkApp_App_ID_Link = " & me.app_id & " AND ChkApp_Check = 'no'"
Debug.Print strFilter

=DCount("ChkApp_ID","tbl_CheckList_Applicant", strFilter)


---- Andy

There is a great need for a sarcasm font.
 
Moss100,
I hope you took away a couple things from Andy's reply:
[ul]
[li]Create a variable to store a string as your filter[/li]
[li]Use debug.print profusely as you write your code[/li]
[/ul]
I've been programming in Access for about 25 years and I still use the same methods. I don't make quite as many mistakes but when I do, I find them a lot quicker.

Duane
Minnesota
Hook'D on Access
MS Access MVP 2001-2016
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top