Re: Conditional printing of records in the detail section of a rep

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



HI, Allen,

I got sick, still sick, so I'm putting this on hold for the moment. I'm
going to wait for the book I ordered to come before getting back to this.
It's been shipped.

I'll post again when I get something figured out.

In the meantime, thanks for the help.

Ken

"Allen Browne" wrote:

The short answer to your immediate question is, Yes: you need to build a
query with a calculated field. In query design, type an expression like
this:
TotalOffering: Nz([A],0) + Nz([B],0) + Nz([C],0) + ...
using your field names in place of A, B, and C. You can then filter on this
expression.

The longer answer is that if you have 35 columns with similar values, you
have built a spread*** in Access. That's not how you design a relational
database. This should be 2 tables:
- one that contains whatever the main thing is (a person? a group? a date?)
- a related table that contains the various values in one field, but in many
records.
You can then solve the whole thing in several really simple ways (e.g. a
totals query.)

An unbound form just means one that has nothing in its Record Source.
Consequently it is not getting data from a table or query. You would not use
an unbound form if you want to save records; but if you need an interface to
display a comment, or get a filter value, it's useful.

If you want to work with the event procedures, you will need to buy some
books again. That fire sounds nasty.

I can't emphasize enough how important it is to learn about using related
tables rahter than repeating columns. That's absolutely crucial. If you get
that right, you avoid many headaches: no VBA workarounds can substitute for
a relational data structure. Post more info about this table if you don't
understand how to normalize it. Or perhaps the table analyzer can make
suggestions (Tools menu.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Ken Springer" <wordworks.nospam@xxxxxxxxxxxxxx> wrote in message
news:57685894-3CC6-4326-9566-7513B243A9CD@xxxxxxxxxxxxxxxx
Hi, Allen,

OK, let's try this again. But I'm not going to get as detailed as last
night, in case the system crashes again.

The query option, as outlined in your post, doesn't work. That seems to
be
due to the fact the field, in the data entry form, I would like to check
for
a number greater than zero does not exist in the database table. It
exists
only in the form, where it sums the data in other fields in the table.

I called this a calculated field in the original post. The field, called
"Total Offering", sums the numbers from approximately 35 numerical fields
in
the table, and displays the total in the form display.

A simplified example of the database would be: There are 3 fields in the
table, A, B, and C. In the data entry form, you may or may not enter the
data in to A, B, and C. The default data is zero. But in the form only,
there is a 4th field, D, that displays the sum of the other 3 fields, i.e.
A
+ B + C. I need to see if the sum displayed in D is greater than zero.
If
it is greater than zero, I want specified data from that record to print.
If
the data is zero, null, anything else, the record is NOT to print.

Is that clear as mud????????? LOL

Am I going to have to build a query that first sums all the necessary
table
cells, check to see if it is greater than zero, and go from there?

Is there, somewhere on MS's site, a file that lists and explains the
commands used in the Event Procedure?

I need to figure out what an unbound form is too. LOL

Ken


.


Quantcast