error in result dcount query (1 Viewer)

mohamedmatter

Registered User.
Local time
Today, 05:02
Joined
Oct 25, 2015
Messages
90
I attach courses Db

I want to dcount sql course and date > #31/1/2020# in Sql query

I want to dcount [sql and word] course and date > #31/1/2020# in sql_word query

I tired but error display when run queries

And

I want instructions to write function in query

Many thanks
 

Attachments

theDBguy

I’m here to help
Local time
Today, 05:02
Joined
Oct 29, 2018
Messages
10,176
Hi. For the first query, you could try something like:
SQL:
SELECT Count(*) FROM Course_tbl WHERE Course_Name="sql" AND Course_Date=#1/31/2020#
And for the second one, you could try:
SQL:
SELECT Count(*) FROM Course_tbl WHERE Course_Name In("sql","word") AND Course_Date=#1/31/2020#
Hope that helps...
 

mohamedmatter

Registered User.
Local time
Today, 05:02
Joined
Oct 25, 2015
Messages
90
thankes it works
how learn instructions to write sql in query
 

MickJav

AWF VIP
Local time
Today, 13:02
Joined
Nov 28, 2005
Messages
1,819
I've added Query3 which shows distinct course count for a date
Open the query and view the property sheet by right clicking in the area where the tables are.

hope it helps
mick
2020-02-22.png
 

Attachments

MickJav

AWF VIP
Local time
Today, 13:02
Joined
Nov 28, 2005
Messages
1,819
Just change the field in query3 for what you need
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom