Zeros

  • Thread starter Thread starter rob p
  • Start date Start date
R

rob p

One query (queryforchecknumber) has an additional column set up as:
runcheck: (DMax("checknumber+1","tblpayeedetail","+1")) with Expression on.

I have a textfield on a form that has
=DMAX("runcheck","queryforchecknumber",""). This works for me. Problem is
the checknumber in the top table/query is formatted with 6 positions with
leading zeros. 000101, 000102, etc.

When I added the 1 to the checknumber I lost that formatting. 101, 102, etc.
How can I mask the field so I get the leading zeros on the form and on the
following report?

thanks.
 
When you added the one, Access converted from a text value to a numeric value. You just
need to reformat it.

=Format(DMAX("runcheck","queryforchecknumber",""), "000000")
or
You could place six zeros (without the quotes) in the Format line of the Properties sheet
for the control.
 
Back
Top