Re: Form Save

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



The problem I'm having is that the field that is determined off the Date and
Increment Number is a required field with no duplicates

What happens is that the form opens fine and the calculations are correct in
the form but has not yet been saved to the table. If someone else opens the
form on another machine, they get the same calculation. When they go to save
the form they get an error. I'm trying to get the calculation done and saved
in the table as instantly as possible with the error checking done to make
sure the entry is saved to the table before an operator starts typing.



"Jeanette Cunningham" wrote:

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)
  • SQL - CRecordSet
    ... I am trying to use MFC and CRecordSet class to manage a database. ... of the currently selected record before the AddNew call. ... I'd like to know what are the default fields (or special fields like auto ... increment) filled in after addnew / update. ...
    (microsoft.public.vc.mfc)
  • 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: Form Save
    ... Yes, that is how Access works, the autonumber primary key is not created ... Auto Number ... Case Number (defaults to the combination of Date and Increment Number) ... I've tried a number of Docmd.Save or Requiry or macro saves, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Multiple Statements in a query
    ... tried sending another query after the first (once I knew that it the ... If you're trying to return the last inserted row on a table with an auto ... increment field all you have to do is query the maximum value in that ...
    (comp.lang.php)