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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

avoiding null errors

Status
Not open for further replies.

smiley0q0

Technical User
Feb 27, 2001
356
US
i have a macro that runs an update query and then prints a report of 3 different clients, some days one client or the other does not have any new info, or no info for the date that is specified, right now the report prints a couple pages with errors all over it for the client that is missing, how do i have it not print anything if the client does not have any info

thanks for you help
 
Hello Smiley my star'y friend,
In the query that "drives" your report or in the field on your report I believe you could use the Nz (Null to zero) and/or IIF Functions:

IIf(Nz(varFreight) > 50, "High", "Low")

Check Access help on these two little functions as there's lots of decent examples to look at. :) Gord
ghubbell@total.net
 
Without knowing the specifics of your macro I can only guess at a few options:

1. Perhaps an iif statement would help: if condition then do something or don't do something.

2. Perhaps null to zero would help (NZ) which might allow calculations to produce a zero rather than an error. (You may need to implement this through a module, which is pretty easy.)

3. Perhaps a condition statement would help by allowing certain statements to run in your macro only if certain conditions are met.

If you wish you could post your macro here or e-mail it to jeff.snyder@angelfire.com with the subject "avoiding null errors" and I might be able to get more specific.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top