Help removing Error upon Use of DMax (1 Viewer)

C.F.

Registered User.
Local time
Yesterday, 20:21
Joined
Jan 7, 2009
Messages
17
:confused: DMax is returning an "#Error" as I try to use it to find the largest "Acqusition Number" in the table "ACQ FY08":

In the text box "Acquisition Number", on the data tab under Default Value I've entered --
=DMax("Acquistion Number","ACQ FY08")+1

I am also getting an Access error message: "Syntax error (missing operator) in query expression 'Max(Acqusition Number)'."


A past consultant set up this database with a "front end" ( gui file) and a "back end" ( .data file). Could that be causing a problem with the functioning of DMax? How do I get this to work?
:confused:
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:21
Joined
Aug 30, 2003
Messages
36,134
Due to the inadvisable spaces, you probably need to bracket both names:

=DMax("[Acquistion Number]","[ACQ FY08]")+1
 

C.F.

Registered User.
Local time
Yesterday, 20:21
Joined
Jan 7, 2009
Messages
17
RESOLVED! Read thru one of the similar threads, saw a difference in the way DMax was set up -- added brackets to the Acqusition Number [Acqusition Number] -- and it works! PTL!
 

C.F.

Registered User.
Local time
Yesterday, 20:21
Joined
Jan 7, 2009
Messages
17
Thank you, Paul! The brackets appeared to be the problem, although I just bracketed the field name and not the table name.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:21
Joined
Aug 30, 2003
Messages
36,134
No problem, and welcome to the site. Most of us recommend against spaces in object names because of problems like this. If it's not too late, you may want to change the names. If it is, keep the brackets in mind because you'll need them a lot!
 

sameep

New member
Local time
Yesterday, 17:21
Joined
Mar 17, 2011
Messages
7
Due to the inadvisable spaces, you probably need to bracket both names:

=DMax("[Acquistion Number]","[ACQ FY08]")+1

The problem I have with this function is am able to use it in 1 cell but i is giving me an error if i try to drag or copy the formula

=DMAX(C2:E6,E2,A22:A23)
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:21
Joined
Aug 30, 2003
Messages
36,134
This thread was about using it in Access, not Excel. What's the error? What cell is it working in, and where are you trying to copy it?
 

sameep

New member
Local time
Yesterday, 17:21
Joined
Mar 17, 2011
Messages
7
This thread was about using it in Access, not Excel. What's the error? What cell is it working in, and where are you trying to copy it?


I am using it on excel.

give me an email where I can email it to you? I will email you the excel file. It is only working on the first cell but cant drag or past the formula in the following cell
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:21
Joined
Aug 30, 2003
Messages
36,134
You should be able to attach it here.
 

sameep

New member
Local time
Yesterday, 17:21
Joined
Mar 17, 2011
Messages
7
AGENTSALESPERIODA1001-JanA2002-FebB3003-MarC4004-AprAGENTSALESA2-Feb-11B#VALUE!
=DMAX(C$2:E$6,E2,C9:C10)
 

sameep

New member
Local time
Yesterday, 17:21
Joined
Mar 17, 2011
Messages
7
here is the file
 

Attachments

  • error.xls
    17.5 KB · Views: 112

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:21
Joined
Aug 30, 2003
Messages
36,134
The second and third arguments get goofed up when you copy. The second you can fix by locking it with the $, the third by partially locking it (the top).
 

sameep

New member
Local time
Yesterday, 17:21
Joined
Mar 17, 2011
Messages
7
The second and third arguments get goofed up when you copy. The second you can fix by locking it with the $, the third by partially locking it (the top).



I still get the same error. Can you please put it on that sheet and email it to me

sameep.dixit at gmail.com

I am doing a project and whole of it is stuck because of this 1 error.

I will really be grateful for your help!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:21
Joined
Aug 30, 2003
Messages
36,134
=dmax(c$2:e$6,$e$2,$c$9:c10)
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 17:21
Joined
Aug 30, 2003
Messages
36,134
You may have better luck posting this in the Excel forum. I don't do that much analysis with Excel. My gut is that it prefers the criteria on one line rather than stacked like that, but there are people far more knowledgable than I with Excel.
 

Users who are viewing this thread

Top Bottom