DCount error

S

Sean Timmons

I have the following DCOUNT on a form:

=DCount("[QA Score]","Conversation_Table",Month([Date of
Audit])=Month(Now()) And [QA Name]=[Auditor])

Looking to get a count by QA Name of audits completed in the current month.

QA Score is a field in Conversation_Table that stores an integer.

Date of audit should be self-explanatory.

QA Name is the field on the form and Auditor is the field in the table.

When I run my report with this expression, I get a record deleted message
and no report.

Did I write the expression correctly?

If so, what would cause a record deletion error? Scary to say the least....
 
D

Duane Hookom

Try:
=DCount("[QA Score]","Conversation_Table", "Month([Date of Audit])=" &
Month(Date()) & " And Auditor =""" & [QA Name] & """")
 
S

Sean Timmons

Still geting the error, and shame on me for not stating this initially...

I am working in a DB that is linked to an active DB. Could it just be a
matter of people adding records? No one would be deleting any....

Duane Hookom said:
Try:
=DCount("[QA Score]","Conversation_Table", "Month([Date of Audit])=" &
Month(Date()) & " And Auditor =""" & [QA Name] & """")

--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
I have the following DCOUNT on a form:

=DCount("[QA Score]","Conversation_Table",Month([Date of
Audit])=Month(Now()) And [QA Name]=[Auditor])

Looking to get a count by QA Name of audits completed in the current month.

QA Score is a field in Conversation_Table that stores an integer.

Date of audit should be self-explanatory.

QA Name is the field on the form and Auditor is the field in the table.

When I run my report with this expression, I get a record deleted message
and no report.

Did I write the expression correctly?

If so, what would cause a record deletion error? Scary to say the least....
 
D

Duane Hookom

What is the error? Is it possible for Date Of Audit or QA Name to be Null?

Can you provide the actual table structure with field names and data types
for the Conversation_Table?

Is [QA Name] text or numeric?

Have you checked the spellings?


--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
Still geting the error, and shame on me for not stating this initially...

I am working in a DB that is linked to an active DB. Could it just be a
matter of people adding records? No one would be deleting any....

Duane Hookom said:
Try:
=DCount("[QA Score]","Conversation_Table", "Month([Date of Audit])=" &
Month(Date()) & " And Auditor =""" & [QA Name] & """")

--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
I have the following DCOUNT on a form:

=DCount("[QA Score]","Conversation_Table",Month([Date of
Audit])=Month(Now()) And [QA Name]=[Auditor])

Looking to get a count by QA Name of audits completed in the current month.

QA Score is a field in Conversation_Table that stores an integer.

Date of audit should be self-explanatory.

QA Name is the field on the form and Auditor is the field in the table.

When I run my report with this expression, I get a record deleted message
and no report.

Did I write the expression correctly?

If so, what would cause a record deletion error? Scary to say the least....
 
D

Duane Hookom

I don't know if this got through the first time since it reported an error.

Can you provide the actual error as well as the structure of
Conversation_Table including field names and data types?

Have you checked the spellings? Is [QA Name] text or numeric?
--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
Still geting the error, and shame on me for not stating this initially...

I am working in a DB that is linked to an active DB. Could it just be a
matter of people adding records? No one would be deleting any....

Duane Hookom said:
Try:
=DCount("[QA Score]","Conversation_Table", "Month([Date of Audit])=" &
Month(Date()) & " And Auditor =""" & [QA Name] & """")

--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
I have the following DCOUNT on a form:

=DCount("[QA Score]","Conversation_Table",Month([Date of
Audit])=Month(Now()) And [QA Name]=[Auditor])

Looking to get a count by QA Name of audits completed in the current month.

QA Score is a field in Conversation_Table that stores an integer.

Date of audit should be self-explanatory.

QA Name is the field on the form and Auditor is the field in the table.

When I run my report with this expression, I get a record deleted message
and no report.

Did I write the expression correctly?

If so, what would cause a record deletion error? Scary to say the least....
 
S

Sean Timmons

OK!

the specific "error" is "Record is deleted." The title is "Microsoft
Access". I get an OK and a Cancel as my options.

I have a bunch of field names and data types in Conversation_Table (At least
50), so not sureif you want to see all of them. I have some text, lots of
Yes/No, Date for date of Audit, Integer for Scores.

There are no Null QA Names or Auditors.

Both Auditor and QA Name are Text fields.

Duane Hookom said:
I don't know if this got through the first time since it reported an error.

Can you provide the actual error as well as the structure of
Conversation_Table including field names and data types?

Have you checked the spellings? Is [QA Name] text or numeric?
--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
Still geting the error, and shame on me for not stating this initially...

I am working in a DB that is linked to an active DB. Could it just be a
matter of people adding records? No one would be deleting any....

Duane Hookom said:
Try:
=DCount("[QA Score]","Conversation_Table", "Month([Date of Audit])=" &
Month(Date()) & " And Auditor =""" & [QA Name] & """")

--
Duane Hookom
Microsoft Access MVP


:

I have the following DCOUNT on a form:

=DCount("[QA Score]","Conversation_Table",Month([Date of
Audit])=Month(Now()) And [QA Name]=[Auditor])

Looking to get a count by QA Name of audits completed in the current month.

QA Score is a field in Conversation_Table that stores an integer.

Date of audit should be self-explanatory.

QA Name is the field on the form and Auditor is the field in the table.

When I run my report with this expression, I get a record deleted message
and no report.

Did I write the expression correctly?

If so, what would cause a record deletion error? Scary to say the least....
 
D

Duane Hookom

Where are you using this expression? I can't imagine how "record is deleted"
would display in the text box. This is a text box control source isn't it?

Could you at least provide the significant fields from Conversation_Table?
The only ones I am interested in are the ones from your expression.

--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
OK!

the specific "error" is "Record is deleted." The title is "Microsoft
Access". I get an OK and a Cancel as my options.

I have a bunch of field names and data types in Conversation_Table (At least
50), so not sureif you want to see all of them. I have some text, lots of
Yes/No, Date for date of Audit, Integer for Scores.

There are no Null QA Names or Auditors.

Both Auditor and QA Name are Text fields.

Duane Hookom said:
I don't know if this got through the first time since it reported an error.

Can you provide the actual error as well as the structure of
Conversation_Table including field names and data types?

Have you checked the spellings? Is [QA Name] text or numeric?
--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
Still geting the error, and shame on me for not stating this initially...

I am working in a DB that is linked to an active DB. Could it just be a
matter of people adding records? No one would be deleting any....

:

Try:
=DCount("[QA Score]","Conversation_Table", "Month([Date of Audit])=" &
Month(Date()) & " And Auditor =""" & [QA Name] & """")

--
Duane Hookom
Microsoft Access MVP


:

I have the following DCOUNT on a form:

=DCount("[QA Score]","Conversation_Table",Month([Date of
Audit])=Month(Now()) And [QA Name]=[Auditor])

Looking to get a count by QA Name of audits completed in the current month.

QA Score is a field in Conversation_Table that stores an integer.

Date of audit should be self-explanatory.

QA Name is the field on the form and Auditor is the field in the table.

When I run my report with this expression, I get a record deleted message
and no report.

Did I write the expression correctly?

If so, what would cause a record deletion error? Scary to say the least....
 
S

Sean Timmons

I am now going to hang my head in shame.

In trying to get a count, I decided to perform a Group By in my Report's
Record Source Query. I must not have looked at the output until after I then
created my DCOUNT statement.

So, when I ran the report, I got the error and forgot completely about the
Group By.

Anyways, I removed that pesky thing and ran with the DCOUNT. Magically, it
worked!

So sorry for wasting your time with that.... Bah.

Duane Hookom said:
Where are you using this expression? I can't imagine how "record is deleted"
would display in the text box. This is a text box control source isn't it?

Could you at least provide the significant fields from Conversation_Table?
The only ones I am interested in are the ones from your expression.

--
Duane Hookom
Microsoft Access MVP


Sean Timmons said:
OK!

the specific "error" is "Record is deleted." The title is "Microsoft
Access". I get an OK and a Cancel as my options.

I have a bunch of field names and data types in Conversation_Table (At least
50), so not sureif you want to see all of them. I have some text, lots of
Yes/No, Date for date of Audit, Integer for Scores.

There are no Null QA Names or Auditors.

Both Auditor and QA Name are Text fields.

Duane Hookom said:
I don't know if this got through the first time since it reported an error.

Can you provide the actual error as well as the structure of
Conversation_Table including field names and data types?

Have you checked the spellings? Is [QA Name] text or numeric?
--
Duane Hookom
Microsoft Access MVP


:

Still geting the error, and shame on me for not stating this initially...

I am working in a DB that is linked to an active DB. Could it just be a
matter of people adding records? No one would be deleting any....

:

Try:
=DCount("[QA Score]","Conversation_Table", "Month([Date of Audit])=" &
Month(Date()) & " And Auditor =""" & [QA Name] & """")

--
Duane Hookom
Microsoft Access MVP


:

I have the following DCOUNT on a form:

=DCount("[QA Score]","Conversation_Table",Month([Date of
Audit])=Month(Now()) And [QA Name]=[Auditor])

Looking to get a count by QA Name of audits completed in the current month.

QA Score is a field in Conversation_Table that stores an integer.

Date of audit should be self-explanatory.

QA Name is the field on the form and Auditor is the field in the table.

When I run my report with this expression, I get a record deleted message
and no report.

Did I write the expression correctly?

If so, what would cause a record deletion error? Scary to say the least....
 

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