dmax #error syntax (1 Viewer)

cpampas

Registered User.
Local time
Yesterday, 21:32
Joined
Jul 23, 2012
Messages
218
hello,
I would like to retrieve a value with the DMax function , from a form, a cant figure out the right syntax

=DMáx("[plaganha]";" tblPlacardTodosAvg ";"[bookieID]=" & [Forms]![frmApostas]![bookerID] & " AND [jogopla]= """ & [jogo] & """")

the field [bookieID] is an integer
the field jogopla is a string

Any thoughts about this ?
 

bob fitz

AWF VIP
Local time
Today, 05:32
Joined
May 23, 2011
Messages
4,727
assuming this is being called from the form frmApostas

=DMáx("[plaganha]";" tblPlacardTodosAvg ";"[bookieID]=" & Me.[bookerID] & " AND [jogopla]= '" & [jogo] & "'")
 

Dreamweaver

Well-known member
Local time
Today, 05:32
Joined
Nov 28, 2005
Messages
2,466
Not Sure if it matter but you have a space before and after tblPlacardTodosAvg I.E. " tblPlacardTodosAvg "
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 12:32
Joined
May 7, 2009
Messages
19,245
also the Dmax word, correct or no?
 

Dreamweaver

Well-known member
Local time
Today, 05:32
Joined
Nov 28, 2005
Messages
2,466
Think you might be right @arnelgp compiling should have picked that up if uing Option Explicit
 

cpampas

Registered User.
Local time
Yesterday, 21:32
Joined
Jul 23, 2012
Messages
218
the DMáx is correct, wich is automaticaly corrected by Access according to the portuguese version of Ms Access I am working with
the issue was realy what Mickjav mentioned, wich were the spaces before and after tblPlacardTodosAvg I.E. " tblPlacardTodosAvg "
that is what happens when I choose copy/paste the name of a table instead of typing it. I am sure I would spend the whole day looking at this and not be able to see it

thanks a lot for your kind help
 

Users who are viewing this thread

Top Bottom