Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report in which blank fields will omit the record from the report 2

Status
Not open for further replies.

superxela

Technical User
May 14, 2002
12
US
Hello there,

I'm working on this Access 2000 database where the objetive is to give members(records) a choice of five meals per day. However some members may choose to skip a day. I don't want those members to show on the report for that day.
So the filter must check for values in the fields for that particular day; If the fields are blank for anyparticlar member, he should be omited from the report.

How do I go about implementing such a filter in the report?

Take into consideration I'm new to access (although I'm learing fast) when answering.
Thank you for you help,
Alex Rodriguez
 
A way is to 'fix' it in the recordsource for the report. Construct the 'criteria' such that if the relevant fields are 'empty', the recordsource does not include the record(s).

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Hello Michael,
Sorry it took so long to get back on track, I was on a trip.

The record source is a table named "General Customer Data"
I'm not sure as to how to implement such a 'criteria.'

I entered the table in design view. I went down to the first field that I would like to be omited if the value is 'blank' (a zero length string).

here is the data on that field:
Field Name: Monday Breakfast
Data Type: Text
_________________General Tab______________________
Field Size: 50
Format:
Imput mask:
Caption:
Default value:
Validation rule:
Validation Text:
Required: No
allow zero legth: Yes
Indexed: No
Unicode compresion: Yes
__________________LookUp Tab________________________
Display Control: Combo Box
Row source Type: Value List
Row Source: "Egg white";"muffin";"oatmeal"
Bound Column: 1
Column Count: 1
Column heads:No
Column widths: 1.35"
Lst Rws 8
List width: auto
Limit to list: no

__________________________________________________

How do I Implement the such a criteria?

Thanks,
Superxela


 
Hmmmmmmmmmmmm,

First, the recordsource for the report would need to be a query. If you do not know how to generate a query, we need to start with that. I had assumed the recordsource was a query, and meant to apply the criteria within the query, as in "Not IsNull" in some field(s) which designate participation in the activity.

The query can just be all of the fields in the table, or it could be a sub-set necessary for the report.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
ok, the Query is now done. I made it so that it pulls all the needed values for the report fron the table. what next?
 
In the query (design), simply add the criteria. Briefly, in the row (criteria) under the column(s) which include the elements to EXCLUDE, add the statement(s), such as:

Not IsNull

for a text field which is "empty" or

True

for a yes/no field

...


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
I enter "Not IsNull" in the Criteria fields of the Querie. It worked but here is one problem:

The querie is to pick up five meals for every day,In this case Monday Breakfast, Monday Lunch, Monday Dinner, Monday Snack and Monday Bar. I put the "Not IsNull" under each of the fields of the Query.
But if one of the fields is blank it doesn't show the record. Idealy it would check all five fields and if the client has only Lunch but not Breakfast, Dinner, Snack or bar it should still show up in the report. With the "Not IsNull" If one field is blank, doesn't matter if the other has data, it will not show the record.

Is there a way to do that? Only when all five fields are empty should the record be omited from the query.

Thanks for you promptness in answering. It is appreciated.
 
If you put all of hte five criteria on the same criteria ROW, it should be correct. The criteria rows act as "AND", while the (criteria) columns act as OR, so all in the same row should be ~~

Not IsNull([Breakfast]) AND Not IsNull([Lunch]) AND Not IsNull([Dinner]) AND Not IsNull([Snack]) AND Not IsNull([Bar]) MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top