Full Version: DMax error
UtterAccess Forums > Microsoft® Access > Access Forms
swaziman1
Hi,
I am getting an #Name? error when i try the following dmax code,
am i doing it wrong?
=DMax("[VolumeID]","[tblOTCVolume]","[OTCID] = " & [otcid])
thanks
Alan_G
Your expression looks fine. Is [otcid] a control on the form you're using the expression and is it a numerical value?
swaziman1
hi , OTCid is a bound text box on my form where the code is and it is a number , does that change things?
Alan_G
Are you using the code directly in the control source of an unbound textbox? Is there a possibility that [otcid] could be Null. Are you sure that the fields VolumeID and OTCID exist in tblOTCVolume and all names are spelt correctly? I'm sure you've checked all these things already, just going over the obvious really.............
Larry Larsen
Hi
Also try:
CODE
=DMax("[VolumeID]","[tblOTCVolume]","[OTCID] = " & Me.[otcid])

thumbup.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.