PC Review


Reply
Thread Tools Rate Thread

The newly created record is now shown in the form

 
 
Mehrdad
Guest
Posts: n/a
 
      25th Jun 2010
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
 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      25th Jun 2010
Try doing a Requery.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
Co-author: Access 2010 Solutions, published by Wiley
(no e-mails, please!)

"Mehrdad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      25th Jun 2010
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.

"Mehrdad" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
Mehrdad
Guest
Posts: n/a
 
      25th Jun 2010
On Jun 25, 4:23*pm, "Jeff Boyce" <(E-Mail Removed)> wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2003: Drop newly created signatures into a newly created pulldown Kpundt Microsoft Outlook Discussion 0 6th May 2010 09:52 PM
In VBA how can I start a newly created media shape when created John Crawford Microsoft Powerpoint 10 19th Jul 2006 05:40 AM
How do I Auto record journal activity for newly created contacts =?Utf-8?B?S2lt?= Microsoft Outlook Discussion 0 10th Mar 2005 02:29 PM
Geting primary key from newly created record (DAO.Recordset) Niklas Ístergren Microsoft Access 2 5th Nov 2004 06:50 PM
Re: Saving a Newly Created Record Bill Microsoft Access Form Coding 0 4th Sep 2004 09:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:21 PM.