Auto Insert Next Record Number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to insert the next record number into a form. The Field name is BoxID
and the field is a text a text field. The Number should be takenfrom the
[Box] Table.

I searched around and found the DMax() function with this code, to be put in
the [BoxID} Default Property but it dosen't work
DMax("[ManulaID]","tblYourTableName") + 1, I changed ManualID for BoxID
Can someone help?
 
Sorry Rick I don't know how to use the auto number field, could you explain?
Thanks



Rick B said:
Could you not simply use an auto-number field?

Terry said:
I need to insert the next record number into a form. The Field name is BoxID
and the field is a text a text field. The Number should be takenfrom the
[Box] Table.

I searched around and found the DMax() function with this code, to be put in
the [BoxID} Default Property but it dosen't work
DMax("[ManulaID]","tblYourTableName") + 1, I changed ManualID for BoxID
Can someone help?
 
When creating a table, you can make a field's data type "auto-number". This
will create a consecutive number (normally used as a primary key) in a
table. If you care about the format or number of digits used in your box
number field, then you most likely don't want to go this route, but it works
well if you want to give a sequencial number to each record in a table.


Since you already have a table with records, this may not be the route you
want to take.


Rick B


Terry said:
I should have said I have hundreds of boxes in the Box Table

Terry said:
I need to insert the next record number into a form. The Field name is BoxID
and the field is a text a text field. The Number should be takenfrom the
[Box] Table.

I searched around and found the DMax() function with this code, to be put in
the [BoxID} Default Property but it dosen't work
DMax("[ManulaID]","tblYourTableName") + 1, I changed ManualID for BoxID
Can someone help?
 
Thanks again Rick. Hope someone can help me

Rick B said:
When creating a table, you can make a field's data type "auto-number". This
will create a consecutive number (normally used as a primary key) in a
table. If you care about the format or number of digits used in your box
number field, then you most likely don't want to go this route, but it works
well if you want to give a sequencial number to each record in a table.


Since you already have a table with records, this may not be the route you
want to take.


Rick B


Terry said:
I should have said I have hundreds of boxes in the Box Table

Terry said:
I need to insert the next record number into a form. The Field name is BoxID
and the field is a text a text field. The Number should be takenfrom the
[Box] Table.

I searched around and found the DMax() function with this code, to be put in
the [BoxID} Default Property but it dosen't work
DMax("[ManulaID]","tblYourTableName") + 1, I changed ManualID for BoxID
Can someone help?
 
Back
Top