Calculated field for distance - Cannot get DMax() to work.

D

Doug

Access 2000:

Distance: [tblRepairs].[RepairMileage] -
Dmax("tblRepairs.RepairMileage","tblRepairsQuery","tblRepairs.RepairMileage
< "
& [tblRepairs].[RepairMileage] )

Access complains " the expression contains invalid syntax"

Can anyone help?
TIA
Doug
 
M

Michel Walsh

Hi,


You probably have a NULL among the values under RepairMileage, so that the
third argument of DMax makes a string which, once trying to evaluate it, is
an invalid syntax... Try:


Distance: tblRepairs.RepairMileage -
Dmax("RepairMileage","tblRepairsQuery","RepairMileage
< " & Nz(RepairMileage, 0) )



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top