Simple update quesion

  • Thread starter Thread starter Greg Jesky
  • Start date Start date
G

Greg Jesky

I am new.
I have created a form to use to add records to a table. I type my values
into the form and the table is updated just as I need.
However when I want to type the next record I need to type all fields again.
Depending upon the record to be added, I could save a lot of time if I could
modify the record I just added to the DB rather than retype the record from
scratch into the form.

I can go into datasheet and copy record 1 and paste as record 2. Then I can
update just the fields necessary and then update the table. This saves me
considerable typing.


I guess what I am trying to say is with a form can I display the last record
in a table(record 1).
Change the values in certain fields and put the updated form into the
database as record 2

I apologize if this is too trivial.

Thanks,
Greg
 
I guess what I am trying to say is with a form can I display the last record
in a table(record 1).
Change the values in certain fields and put the updated form into the
database as record 2

Two suggestions:

- Put just a bit of VBA code in the AfterUpdate event of each control
which you want to routinely "carry over" to the next record:

Private Sub controlname_AfterUpdate()
Me!controlname.DefaultValue = Chr(34) & Me.controlname & Chr(34)
End Sub

This will set the default value of the control to its currently
entered value, so when you go to the next record it will automatically
fill in.

Note that this can be risky: sometimes the value needs to be changed
and that necessity gets overlooked!

- A deeper solution: investigate the structure of your tables. If you
routinely have lots of repeating fields, perhaps you need two tables
in a one-to-many relationship, so you enter the (currently repeating)
fields in the "one" table once, and relate them to multiple records in
the "many" side table.

John W. Vinson[MVP]
 
Another option is to use Ctrl + " this will copy the field value from
previous record.

Herman
 
Back
Top