Minggu, 28 Agustus 2011

RE: [MS_AccessPros] Dcount not working

There is no field [ApplicationStatusTypeID] exposed in the SELECT section of qryWaitingListCurrentMonth. Why is this even included in the DCount() since records in the query are already filtered?

Duane Hookom
MS Access MVP

To: MS_Access_Professionals@yahoogroups.com
From: dbalorenzini@yahoo.com
Date: Sun, 28 Aug 2011 09:50:59 -0700
Subject: Re: [MS_AccessPros] Dcount not working


=DCount("ApplicationID","qryWaitingListCurrentMonth","ApplicationStatusTypeID =3 AND StatusDate BETWEEN Year(StatusDate) = Year(Date()) AND Month(StatusDate) = Month(Date()) ")

THis is what I have now and it's still throwing a error. The is the syntax for qryWaitingListCurrentMonth.

SELECT tblApplicationStatus.ApplicantID, tblApplicationStatus.StatusDate, tlkpApplicationStatusType.ApplicationStatusTypeName, tblApplicationStatus.ApplicationID
FROM tblApplicationStatus INNER JOIN tlkpApplicationStatusType ON tblApplicationStatus.ApplicationStatusTypeID = tlkpApplicationStatusType.ApplicationStatusTypeID
WHERE (((tblApplicationStatus.ApplicationStatusTypeID)=3));

With warm regards,

Arthur Lorenzini| SQL Server/Access Developer l alorenzin@live.com
Office: 605-338-0947| Mobile: 605-857-9137 | Fax: 605-338-0947

1316 E. 7th Street
Sioux Falls, SD 57103
SQL Server Development
Database Adminstration Services
Microsoft Access Development
Grant Writing TA Services
IT Assessment Services
Software Application Training

From: Crystal <strive4peace2008@yahoo.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Sunday, August 28, 2011 11:10 AM
Subject: Re: [MS_AccessPros] Dcount not working


Hi Art,

if the data type for ApplicationStatusTypeID is numeric, then remove the delimiters

ApplicationStatusTypeID = '3' -->
ApplicationStatusTypeID = 3

Make sure that the DisplayControl for ApplicationStatusTypeID in the table design is TEXTBOX, not combo or listbox

~~~
if it still doesn't work, change the Between clause to -->

Year(StatusDate) = Year(Date()) AND Month(StatusDate) = Month(Date())

Warm Regards,
Crystal

Access Basics by Crystal (Bill Mosca's site)
http://thatlldoit.com
Free 100-page book that covers essentials in Access

*
(: have an awesome day :)
*

--- On Sun, 8/28/11, Art wrote:

> I have the followin expression that
> uses a dcount function:
>
> =DCount("ApplicantID","qryWaitingListCurrentMonth","ApplicationStatusTypeID
> = '3' AND StatusDate BETWEEN
> DateSerial(Year(Date()),Month(Date()),1) and
> DateSerial(Year(Date()),Month(Date())+1,0)")
>
> It is returning a error.
>
> I think it has to do with this part:
>
> ApplicationStatusTypeID = '3'
>
> Can you give me some advice?
>
> Thanks,
>
> Art Lorenzini
> Sioux Falls, SD
>

[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/MS_Access_Professionals/join
(Yahoo! ID required)

<*> To change settings via email:
MS_Access_Professionals-digest@yahoogroups.com
MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Tidak ada komentar:

Posting Komentar