Max function

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
 
B

Barry Gilbert

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
 
Top