The newly created record is now shown in the form

  • Thread starter Thread starter Mehrdad
  • Start date Start date
M

Mehrdad

Hi there,

I have created a table in Access which includes several fields and
also have created a form for entering data to this table. Many records
that I have to enter data have many common attributes and I don't want
to type all these attribute for each new record. Instead, I need to
copy the content of one record and paste this content to create the
new record.

To achieve this, I added a button to the form and added DoCms.RunSQL
to create a new record based on the existing record in the form. When
I hit the button a new record created in the table, but in the form
there is no indication that a new record has been created (total
number of records shown on the form remains unchanged). Even if I move
to the first and last record, I cant see the newly create record. Only
if I close the form and I reopen it, I can see that the new record is
shown in the form.

Does anyone know why the newly created record is not accessible
instantly in the form?

Many thanks
 
If you are trying to "copy the content of one record and paste this content
to create the new record", your data may be organized more like a
spreadsheet than a relational database.

So what, you ask? So, MS Access is optimized for well-normalized data.
Both you and Access will struggle to overcome 'sheet data.

Before you go any further, consider revisiting your data structure, with
normalization in mind.

If "relational" and "normalization" are unfamiliar terms, plan on learning
more about them before expecting Access to work easily/well for you.

(and by the way, is there a reason you don't just use a spreadsheet instead?
What is it that you expect Access to do that you couldn't do with, say,
Excel?)

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
If you are trying to "copy the content of one record and paste this content
to create the new record", your data may be organized more like a
spreadsheet than a relational database.

So what, you ask?  So, MS Access is optimized for well-normalized data.
Both you and Access will struggle to overcome 'sheet data.

Before you go any further, consider revisiting your data structure, with
normalization in mind.

If "relational" and "normalization" are unfamiliar terms, plan on learning
more about them before expecting Access to work easily/well for you.

(and by the way, is there a reason you don't just use a spreadsheet instead?
What is it that you expect Access to do that you couldn't do with, say,
Excel?)

Regards

Jeff Boyce
Microsoft Access MVP

Hi Jeff,

I am familiar with the "normalization" in the database design, but for
this small project this is not an issue. The only thing is that there
are a couple of records that are somehow similar. So I want to enter
data for these similar record once, and then modify only those
attributes that are different.

By the way I could manage this by Duplicate Record functionality in
Button Control Wizard.
 
Back
Top