prevent autonumber in access renumbering after modification

R

Ruggo

I currently have a sub-form with a autonumber field. However if I go back to
a record and modify the data, autonumber recreates a new number. This causes
a problem as there are a few fields that do not allow duplicates, hence an
error occurs.
 
K

KARL DEWEY

I am confused as tables can have autonumber fields but forms can not. The
type of objects in a form are --
Textbox
ComboBox
ListBox
Command Button
Label
Option Group
Toggle Button
Option Button
Check Box
Image
Unbound Object Frame
Bound Object Frame
Page Break
Subform
Tab Control
Line
Rectangle
and more but not an autonumber field.
 
S

Steve Schapel

Karl,

I am pretty sure Ruggo was talking about a field in the form's
underlying record source table/query. I am pretty sure he meant that
one of these fields is an Autonumber data type.
 
S

Steve Schapel

Ruggo,

Something unusual is happening here. Do you mean the field is an
Autonumber data type? Or is there some macro or VBA procedure that
assigns the number? Modifying data in an existing record would not
cause an Autonumber field to re-number. It sounds like a new record
might be getting created, instead of editing an existing record. Can
you please post back with more details, i.e. the tables/queries that the
main form and subform are based on, the relevant fields, and the
relationship between them, and maybe a specific example of where the
problem arises? Thanks.
 
Top