if there is no result in query need to have default result zero (1 Viewer)

Shauqeen

Registered User.
Local time
Yesterday, 19:37
Joined
Oct 13, 2013
Messages
10
I there is no result in query, I need the default result zero in my form field. I only use query wizard to create queries
 

JHB

Have been here a while
Local time
Today, 04:37
Joined
Jun 17, 2012
Messages
7,732
Have a look at the NZ function in the MS-Access Help file.
 

Shauqeen

Registered User.
Local time
Yesterday, 19:37
Joined
Oct 13, 2013
Messages
10
I could not find the help
any one knows how to write criteria to get zero if there is no result in the query.
 

Shauqeen

Registered User.
Local time
Yesterday, 19:37
Joined
Oct 13, 2013
Messages
10
Does not work. I am new to this If you please show me how to write criteria in a query which has several queries in it. when we run query some has data and some don't. one which does not have any data available for required date it shows me blank and I could not use blank field in form or report
 

JHB

Have been here a while
Local time
Today, 04:37
Joined
Jun 17, 2012
Messages
7,732
An example is shown below:
The table is called "YourTableName", it has 2 fields in it - "FirstField" and "YourFieldName".
SELECT [YourTableName].FirstField, Nz([YourTableName].[YourFieldName],0) AS ANewFieldName
FROM YourTableName;
Else post your database with some sample data, (zip it then you haven't post 10 post yet). Also the name of in which query you have the problem!
 

Users who are viewing this thread

Top Bottom