Affichage des articles dont le libellé est DMax on mainform referencing subform. Afficher tous les articles
Affichage des articles dont le libellé est DMax on mainform referencing subform. Afficher tous les articles

DMax on mainform referencing subform

samedi 2 mai 2015

Hi I have a form - purchase, and a subform purchasedetailds

they are linked with a field "puid"

I need the dmax to give me the maximum auto number field "pdid" on the subform in a textbox on the mainform.

I used the control source code:
=DMax("[forms]![purchase]![purchasedetailds]![pdID]","[forms]![purchase]![purchasedetailds]","[Forms]![purchse]![purchasedetailds]![puid]=" & [Forms]![purchase]![puid])

and the simpler:
=DMax("purchasedetailds]![pdID]","[purchasedetailds]","[purchasedetailds]![puid]=" &[puid])

and i get the #error in the box can any one see what i am doing wrong?
thanks
Simon
DMax on mainform referencing subform

Labels