I am trying to populate a textbox on a form with the max value in a field of a table. I am setting default value of txtbox to:
=DMax([tablename]![fieldname])
and its not working. Is this even possible or wishful thinking?
I am trying to pull in the max value, add 1 to it when I Click a command button that prints the report, and then on the report reference the max + 1 value. This is so that whenever I print the report a new invoice number will come up.
But need to get the max value from the table onto the form first.
=DMax([tablename]![fieldname])
and its not working. Is this even possible or wishful thinking?
I am trying to pull in the max value, add 1 to it when I Click a command button that prints the report, and then on the report reference the max + 1 value. This is so that whenever I print the report a new invoice number will come up.
But need to get the max value from the table onto the form first.