Error Message when running macro

D

Debbie

I need some help with Access. I'm a new user and am trying to set up a
database for personal use. I'm okay with almost everything except macros. I
keep getting "You cancelled your previous operation"

Here's what I have:

DCount("*","qryMain","[tblPW]=Forms![frmFindPW]![txtPWID]")<=0

DCount("*","qryMain","[tblPW]=Forms![frmFindPW]![txtPWID]")>0

If I enter data in txtPWID on my frmFindPW and that data is not found in
tblPW , I want a msgbox to pop up, but if the data is found in tblPW, then I
want a second form to open. I've got the actions set up properly (I'm pretty
sure), but I always get that same error msg just before the macro runs.
I'm not sure if any of this makes sense to anyone. Is there something that
is incorrect or missing from my condition?
 
D

Duane Hookom

You must provide a field name like:

DCount("*","qryMain","[tblPW].[PWIDField]=Forms![frmFindPW]![txtPWID]")<=0
 

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