Increment number

R

rob p

I have an unbound textbox on a form: =DMax("checknumber","tblcheck"). This
shows me the last check number in an unrelated table to the one in the next
paragraph. This textbox is called txtbox2. This number only displays on form
and won't change per session.

I have another textbox on the form that is called txtbox1. Contents go to a
field in another table. For each record, how can I take the check number in
txtbox2 and increment it in this txtbox1? Meaning for record 1 it would
display txtbox2 + 1 and so on.

thanks. (I've asked similiar questions before I had laid everything out like
this.)
 
S

Steve Schapel

Rob,

When a new record is entered via the form, does the value in txtbox1
then become the maximum value in this field in the "other table"? If
so, I would use this, rather than the txtbox2 value, to base your
incrementing number on.

- Steve Schapel, Microsoft Access MVP
 
K

Kelvin

If you need to increment the number in the form with textbox1 why are you
using textbox2 on another form. Put textbox2 on this same form so that as
you add an entry, the DMAX function will icnrease. Or are you just using
DMAX to get the first number then autonumbering the existing records with
DMAX+1, etc... If so you can try something like using DMAX then adding the
recordnumber property.

=DMAX(...)+Me.CurrentRecord

Kelvin
 
R

rob p

Textbox2 doesn't change. It is the other table only to show me what the last
check number of a check run was.
 

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

Top