New record every startup, but not saved?

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

Guest

Is it possible to have Access create a new record every time a form is
started up, but not saving it each time unless a change is made. ie: Form
starts up and is blanked; user enters nothing, but browses other records; the
new record that is started is not saved.
So far I can make it create a new record, but it saves it every time and I'm
left with a lot of blanks.

Thanks
 
Is it possible to have Access create a new record every time a form is
started up, but not saving it each time unless a change is made. ie: Form
starts up and is blanked; user enters nothing, but browses other records; the
new record that is started is not saved.
So far I can make it create a new record, but it saves it every time and I'm
left with a lot of blanks.

Thanks

Then there's something wrong with your form. By default, a record will
not be saved unless it's been "dirtied", and it won't be dirtied
unless either the user or your code sets a value in some control.

What's the Recordsource for the form? What are its Data Entry, Allow
Updates, Allow Inserts properties? Do you have any code in a Form
event?

John W. Vinson[MVP]
 
John Vinson said:
Then there's something wrong with your form. By default, a record will
not be saved unless it's been "dirtied", and it won't be dirtied
unless either the user or your code sets a value in some control.

What's the Recordsource for the form? What are its Data Entry, Allow
Updates, Allow Inserts properties? Do you have any code in a Form
event?

John W. Vinson[MVP]

The problem is that there used to be a button that added new records that
would create a number for the record with the year at the beginning, and put
in some data, like the date. I used these commands on opening of the form,
so some fields have data entered on startup. Is there any way to keep these
fields, but have the form still act the way I want it to?
 
The problem is that there used to be a button that added new records that
would create a number for the record with the year at the beginning, and put
in some data, like the date. I used these commands on opening of the form,
so some fields have data entered on startup. Is there any way to keep these
fields, but have the form still act the way I want it to?

Well, not easily. It sounds like you always want to create a new
record, but not "actually" create it.

Rather than actually populating the fields at startup, could you
instead set each field's DefaultValue property? That will not take
effect until the user dirties the form.

John W. Vinson[MVP]
 
John Vinson said:
Well, not easily. It sounds like you always want to create a new
record, but not "actually" create it.

Rather than actually populating the fields at startup, could you
instead set each field's DefaultValue property? That will not take
effect until the user dirties the form.

John W. Vinson[MVP]
That would probably work, but I've decided to add a pop up box when the form
opens asking if the user would like to create a new record.
Thanks anyway for the help.
 
Back
Top