Re: Error 3464 with dCount - some computers only
- From: "Rob Parker" <NOSPAMrobpparker@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Jul 2007 09:57:49 +1000
First, a minor correction to my original post. The line producing the error
is actually:
If DCount("*", "qryDocQualityReviewRemind") > 0 Then
[NB: the only change from my original post is the name of the query - I
inadvertently cut/pasted the wrong line from my code.]
The SQL for the query which is producing the error in the dcount statement
is as follows:
SELECT qryDocReview.DocGroup, qryDocReview.ID, qryDocReview.Title,
qryDocReview.Author, qryDocReview.NQRDate, tblDocQRevReminders.Printed
FROM qryDocReview LEFT JOIN tblDocQRevReminders ON (qryDocReview.NQRDate =
tblDocQRevReminders.NQRDate) AND (qryDocReview.ID = tblDocQRevReminders.ID)
WHERE (((tblDocQRevReminders.Printed)=False) AND
((DateAdd("d",-getconst("conDocRevRemind"),[qryDocReview].[NQRDate]))<=Date()))
OR (((tblDocQRevReminders.Printed) Is Null) AND
((DateAdd("d",-getconst("conDocRevRemind"),[qryDocReview].[NQRDate]))<=Date()))
ORDER BY qryDocReview.DocGroup, qryDocReview.ID;
The query itself runs OK on the computer which gives the dcount error.
The line of code I originally posted was:
If DCount("*", "qryDocReviewRemind") > 0 Then
This occurs a little earlier in the same routine, and causes no error. Its
SQL is:
SELECT qryDocReview.DocGroup, qryDocReview.ID, qryDocReview.Title,
qryDocReview.Author, qryDocReview.NRDate AS [Next Review Date],
tblDocReminders.Printed
FROM qryDocReview LEFT JOIN tblDocReminders ON (qryDocReview.ID =
tblDocReminders.ID) AND (qryDocReview.NRDate =
tblDocReminders.NextReviewDate)
WHERE (((tblDocReminders.Printed)=False) AND
((DateAdd("d",-getconst("conDocRevRemind"),[NRDate]))<=Date())) OR
(((tblDocReminders.Printed) Is Null) AND
((DateAdd("d",-getconst("conDocRevRemind"),[NRDate]))<=Date()))
ORDER BY qryDocReview.DocGroup, qryDocReview.ID;
The only difference between these queries is that the one that fails uses a
field NQRDate, and the other uses a field NRDate. Both fields initially
come from linked spreadsheets, and are obtained by qryDocReview (a union
query which combines records from all the spreadsheets) from a series of
select queries which are all of the form:
SELECT "Technical Reports" AS DocGroup, [Technical Reports].ID, [Technical
Reports].Title, [Technical Reports].[Author/Prepared By] AS Author,
IIf(CVDate([Planned Issue Date])>CVDate(nz([Actual Issue
Date],0)),CVDate([Planned Issue Date]),Null) AS NRDate, CVDate([Next Quality
Review Date]) AS NQRDate
FROM [Technical Reports]
WHERE ((([Technical Reports].ID) Is Not Null));
Again, TIA for anything which will help solve this,
Rob
"Jana" <Bauer.Jana@xxxxxxxxx> wrote in message
news:1184015910.278236.97400@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 9, 6:46 am, "Steve" <s...@xxxxxxxxxxxxxxxxxxxx> wrote:
Look at the field(s) in qryDocReviewRemind where there is criteria. Is
the
criteria a date where the field is a number or text? Is the criteria text
where the field is numeric? Is the criteria numeric where the field is
text?
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@xxxxxxxxxxxxxxx
"Rob Parker" <robert.par...@xxxxxxxxxxxxxxxxxxx> wrote in message
news:1183948566.761570.36250@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The references on both systems appeared to be identical (both
application and version).
Unchecked all (except VBA and MS Access) on the problem computer.
Exited from Access, restarted and re-installed all references
(one .ocx reference was missing, so installed from system32 folder).
Reference lists on both computers again identical.
Problem still exists.
Any other suggestions?
Rob
On Jul 9, 11:45 am, "Steve" <s...@xxxxxxxxxxxxxxxxxxxx> wrote:
Open your application on a computer that you know does not get this
error.
Go to the code window behind one of your forms. Click on Tools -
References
and write down the list of references. Now go to the computer that
sees
this
error and look at the references there. If the list is different in
any
way
make it the same. If the list is the same, uncheck all the references
you
can and then scroll the list and reinstall them.
PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resou...@xxxxxxxxxxxxxxx
"Rob Parker" <robert.par...@xxxxxxxxxxxxxxxxxxx> wrote in message
news:1183943652.988989.318310@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
A user of one of my applications gets the error message "Run Time
Error 3464 - Data type mismatch in criteria expression" from this
line
of code:
If DCount("*", "qryDocReviewRemind") > 0 Then
The error also arises if I try to print this dcount expression in
the
immediate window, on the user's computer.
The query itself runs fine, and produces a recordset with 36 records
from the current data.
If I run the same database (the same physical file - not a copy of
it)
on my computer, this code (and the print in the immediate window)
works fine.
I'm at a loss here; and a search of the Access newsgroups has not
produced anything of assistance (although it has produced lots of
hits). Any suggestions would be gratefully appreciated.
TIA,
Rob- Hide quoted text -
- Show quoted text -
Rob:
Can you post the SQL for the query qryDocReviewRemind? Perhaps there
is something odd in the underlying query that is messing you up.
Thanks!
Jana
.
- Follow-Ups:
- Re: Error 3464 with dCount - some computers only
- From: John W . Vinson
- Re: Error 3464 with dCount - some computers only
- References:
- Error 3464 with dCount - some computers only
- From: Rob Parker
- Re: Error 3464 with dCount - some computers only
- From: Steve
- Re: Error 3464 with dCount - some computers only
- From: Rob Parker
- Re: Error 3464 with dCount - some computers only
- From: Steve
- Re: Error 3464 with dCount - some computers only
- From: Jana
- Error 3464 with dCount - some computers only
- Prev by Date: RE: Concept Of Worship In Islam
- Next by Date: Re: Concept Of Worship In Islam
- Previous by thread: Re: Error 3464 with dCount - some computers only
- Next by thread: Re: Error 3464 with dCount - some computers only
- Index(es):
Relevant Pages
|