run time error 2001

L

Lori

I am getting a run time error when I am on a form. It says Runtime error
2001 - and then some text about canceling the previous action. When I click
on the Debug button, it highlights the following code:

Current_Vendor_Count = DCount("*", "tbl_Vendor", "(tbl_Zip_Code.Zip_Code =
tbl_Vendor.P_Zip_Code) AND (tbl_Zip_Code.Local_Agency_Code =
tbl_Vendor.Local_Agency_Code) AND [Status_Code] = 'Active' AND
[Peer_Group_Code] <> 11 ")

It isn't any one action that is causing this error. I get it when I try to
move to another record by clicking the arrow button at the button of the
screen or when I turn the filter off ( I used a search window to open the
record).

Any ideas? Thanks!
 
J

jleckrone

Your DCount Statement will not work. You can only count a field within
a table with DCount. You would need to change it to something like
this:

Current_Vendor_Count = DCount("VendorId", "tbl_Vendor", "P_Zip_Code =
'" & Me.P_Zip_Code & "' AND Local_Agency_Code = '" Me.Local_Agency_Code
& "' AND [Status_Code] = 'Active' AND [Peer_Group_Code] <> 11")
 
E

eos

AUTO-REPLY From George Levitt

Please allow this to confirm a system receipt of your e-mail.

I am out of the office until Wednesday morning (1/12/05) and will not be
reviewing or responding to email or voicemail until that time.

I look forward to replying to your message on Wednesday.

Thanks and warmest regards, George
 

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

Similar Threads


Top