Max function

  • Thread starter Thread starter Rick B.
  • Start date Start date
R

Rick B.

I have a value in my table called Req_No. To get the next request number
I use =Max([Req_No] +1). How can I eliminate the Req_No from showing on
the form and have the max request show instead?

I don't want to have to type in the request each time. Is this a
BeforeUpdate? I also need the Req_No to grow as new requests are entered.

Thanks
 
In the textbox that shows the Req_No field, use the DMAx Function in the
Default Value property, something like:
Dmax("[Req_No]","MyTable") +1

To display the current maximum, create an ubound textbox called txtMaxReq.
In the form's OnCurrent event, put
Me.txtMaxReq = Dmax("[Req_No]","MyTable")


Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top