Error in Dmax Function

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I have a form with the following properties:

MainForm Source: tblProjects (One Side)
SubForm Source: tblEstimates (Many Side)

I would like to default the first subform control,
EstimateNumber, to the next number. Setting the control's
Default Value property to the following results in an
error:

=DMax([EstimateNumber],"tblEstimates",[JobNumber]
=Me.JobNumber)

This also results in an error:

=DMax([EstimateNumber],"tblEstimates",[JobNumber]="00001")

Ideas?
 
Try changing to:

=DMax("[EstimateNumber]","tblEstimates","[JobNumber]= " &
Me.JobNumber)

-Ted
 
Ted,

Thanks for your response.

=DMax("[EstimateNumber]","tblEstimates","[JobNumber]= " &
[Me].[JobNumber]) generates a #Name? error. I've
carefully checked the tblEstimates table, both field names
are correct.

?
 
Back
Top