CharlieT302
Instructor
Hi Everyone,
I am using a Dcount to count up records that match three criteria:
Per_ID = Number Field
Org_ID = Number Field
Conf = Yes/No Field
The following does not work:
If DCount("Org_ID", "Tbl_Deployed_Facilities", Per_ID = Me![Per_ID] And Org_ID = Me![Org_ID] & " And Conf = -1") > 0 then
Msgbox...
Or this one:
DCount("Org_ID", "Tbl_Deployed_Facilities", Per_ID = Me![Per_ID] And Org_ID = Me![Org_ID] And Conflicted = -1) then
(Note: When attaching the formula to a message box for a test, it produces a zero answer.)
A simple test version
Msgbox DCount("Org_ID", "Tbl_Deployed_Facilities", Org_ID = Me.Org_ID)
This formula summarizes "all" the Org ID's rather than those matching the one active on the form. Clearly my syntax is incorrect.
Greatly appreciate the help.
I am using a Dcount to count up records that match three criteria:
Per_ID = Number Field
Org_ID = Number Field
Conf = Yes/No Field
The following does not work:
If DCount("Org_ID", "Tbl_Deployed_Facilities", Per_ID = Me![Per_ID] And Org_ID = Me![Org_ID] & " And Conf = -1") > 0 then
Msgbox...
Or this one:
DCount("Org_ID", "Tbl_Deployed_Facilities", Per_ID = Me![Per_ID] And Org_ID = Me![Org_ID] And Conflicted = -1) then
(Note: When attaching the formula to a message box for a test, it produces a zero answer.)
A simple test version
Msgbox DCount("Org_ID", "Tbl_Deployed_Facilities", Org_ID = Me.Org_ID)
This formula summarizes "all" the Org ID's rather than those matching the one active on the form. Clearly my syntax is incorrect.
Greatly appreciate the help.