Unable to enter new record

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

Guest

Hi,

I have a database that is on a shared folder...I have 7 records on my form
when I enter a new record it does not save. However, when I'm in table view
the ID (auto number) goes from record 7 to record 22, 23, 24. Not sure what
has happened (possibly deleted records) and can anyone help me to fix it??
Thanks in advance.
 
Hi,

I have a database that is on a shared folder...I have 7 records on my form
when I enter a new record it does not save. However, when I'm in table view
the ID (auto number) goes from record 7 to record 22, 23, 24. Not sure what
has happened (possibly deleted records) and can anyone help me to fix it??
Thanks in advance.

This is normal and expected behavior; there's nothing to fix.
Autonumbers always have gaps. If you started to enter a record and
(for whatever reason) interrupt that process, an autonumber value will
be used up.

If you want sequential, gapless numbers - don't use Autonumber;
instead use an Integer or Long Integer Number field, and write VBA
code to populate it.


John W. Vinson[MVP]
 
If that is o.k. why isn't it saving the new record in form view?

Ah! Sorry!

That's a separate issue from the skipped autonumbers (or perhaps, the
fact that it's not saving the record is causing the skipped
autonumbers).

There's something wrong with the Form. I can't see the form, so I
don't know what - but please post the following form properties:

Allow Additions
Allow Updates
Recordsource (if it's a Query post the SQL of the query)
BeforeUpdate (post the code or the macro, if there is anything there)

John W. Vinson[MVP]
 
Allow Additions YES
Allow Updates (Is this Recordset type = Dynaset?)
SQL
SELECT Roster.*, [Supervisor and Team Leaders Day].*
FROM Roster INNER JOIN [Supervisor and Team Leaders Day] ON Roster.ID =
[Supervisor and Team Leaders Day].ID;
Before Update is blank
Thanks
 
Allow Additions YES
Allow Updates (Is this Recordset type = Dynaset?)
SQL
SELECT Roster.*, [Supervisor and Team Leaders Day].*
FROM Roster INNER JOIN [Supervisor and Team Leaders Day] ON Roster.ID =
[Supervisor and Team Leaders Day].ID;

This won't be updateable unless ID is the Primary Key of the "one"
side table in this query. If you open this query as a datasheet, and
scroll to the bottom, does it have a *> blank new record? How are the
two tables related, and why are they both in this form's query? What's
the Primary Key of each?

John W. Vinson[MVP]
 
I don't know if this will help. I went to the webpage recommended here which
had a lot of info but didn't help my similar problem. I had created new
tables with Make-Table Query. What I didn't realize was that the Key fields
didn't get passed to the new tables. Once I put back the Key fields in the
two linked tables, the form was again updateable. Check your tables that are
linked to make sure they have key fields.

Moni said:
Allow Additions YES
Allow Updates (Is this Recordset type = Dynaset?)
SQL
SELECT Roster.*, [Supervisor and Team Leaders Day].*
FROM Roster INNER JOIN [Supervisor and Team Leaders Day] ON Roster.ID =
[Supervisor and Team Leaders Day].ID;
Before Update is blank
Thanks

John Vinson said:
Ah! Sorry!

That's a separate issue from the skipped autonumbers (or perhaps, the
fact that it's not saving the record is causing the skipped
autonumbers).

There's something wrong with the Form. I can't see the form, so I
don't know what - but please post the following form properties:

Allow Additions
Allow Updates
Recordsource (if it's a Query post the SQL of the query)
BeforeUpdate (post the code or the macro, if there is anything there)

John W. Vinson[MVP]
 
Back
Top