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

Dlookup #Error

Status
Not open for further replies.

mlawrenson

IS-IT--Management
Nov 17, 2003
33
GB
Hello. I would like some help on a annoying running total problem please.

I have a main form that contains work orders, a sub form that lists order lines. I would like to sum the value of timespent on each order line. But only if the chargeable box is ticked.

SO I created a "group by" sum query to sum the timespent "where chargeable ='-1', which works fine.

I then created a dlookup control on the footer of the form which looks up values in the above "group by" sum query based on the id, this works fine but my problem is, it only works if there is an entry for that particualar id. If there is no entry I get a #Error.

Do does anyone know a way round this, or maybe a better way of doing this?

Thanks in advance.

 
Try wrapping DLookUp with Nz() function.

________________________________________________________
Zameer Abdulla
Help to find Missing people
Do not cut down the tree that gives you shade.
 
But it didn't fix it
fix WHAT ?
Any chance you could post your relevant code ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
its ok I've sorted it now. I needed a iif function to stop the value displaying for records where there is no id present . Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top