Re: Form Save

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Yes, that is how Access works, the autonumber primary key is not created
until you begin entering data.
Normally, after you enter data for a new record, the data is automatically
saved when you go to a new record.
You wouldn't need to make any macro the save the record, unless you have a
close button on the form.
I'm not sure I've understood your question.
Do you have a problem with saving?

Jeanette Cunningham

"Zanstemic" <Zanstemic@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D0CDE6F3-3632-4B88-9D5D-7107565BE254@xxxxxxxxxxxxxxxx
I have a command button with a macro that opens a form and than does a
GoToRecord New. It has 4 fields

1) Auto Number (Primary Key and auto increments in system)
2) Date (defaults to now() )
3) Increment number (defaults to the number of records for that day)
4) Case Number (defaults to the combination of Date and Increment Number)

It's all working fine, except I can't figure out how to get the record to
auto save. I've tried a number of Docmd.Save or Requiry or macro saves,
etc.

It seems that until I actually type something in the form, the Primary Key
which is an auto number for the record does not get created. Once I type
in
any field, the Auto Number is created and funtions normally.

Any suggestions are appreciated.


.



Relevant Pages

  • Re: Form Save
    ... You calculate the new value for this Primary Key in the Before Update event ... they get the same calculation. ... Auto Number ... Increment number ...
    (microsoft.public.access.modulesdaovba)
  • Re: Auto Number
    ... I found a similar problem and made a procedure to increment the primary key ... The field refno is my primary key and needs to be incremented by 1 each time ... > auto number 1, and sequentially up to about 20,000. ... > Mike from Moriches ...
    (comp.databases.ms-access)
  • Re: Uniqueidentifier
    ... This is a primary key. ... insert into autonum values ... >> If you mean a primary key you could use an auto increment number. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: auto number vs byte
    ... > beginning I designed the primary key to be number ... > instead of auto number in order to save on resourses and ... > lot more difficult in programming compared to auto number. ... > a more complex routine to handle addition of new items ...
    (microsoft.public.access.formscoding)
  • RE: crosstab or looping statement help
    ... number can appear in multiple counties). ... The primary key is an auto ... The other table (tReview) has another auto number primary key with ...
    (microsoft.public.access.reports)