PC Review


Reply
Thread Tools Rate Thread

copy data from Continuous Forms to Datasheet

 
 
Simon
Guest
Posts: n/a
 
      26th Dec 2006
I have a form with two subforms frmRMAParts (Datasheet) and
frmOrderProductsRMA (Continuous form)


in frmOrderProductsRMA It displays products,I then have a button next
to each recored i i would like to click andit will copy the data in
that line into frmRMAParts

I have the following code for the button on frmOrderProductsRMA

Private Sub Command68_Click()

Forms![frmRMA]![frmRMAParts].Form![IDNumber] = Me.IDNumber

End Sub


This codes does work but it will only copy the data into frmRMAParts
(Datasheet) if on the datasheet it is on a new recored, If its not it
will just write over the data

What i would like to do is that every time i click the button on
frmOrderProductsRMA
it copys the data to a new line on frmRMAParts


If any one could help it would be very useful

Thanks

Simon

 
Reply With Quote
 
 
 
 
John Vinson
Guest
Posts: n/a
 
      27th Dec 2006
On 26 Dec 2006 14:45:28 -0800, "Simon" <(E-Mail Removed)> wrote:

>I have a form with two subforms frmRMAParts (Datasheet) and
>frmOrderProductsRMA (Continuous form)
>
>
>in frmOrderProductsRMA It displays products,I then have a button next
>to each recored i i would like to click andit will copy the data in
>that line into frmRMAParts


Data IS NOT STORED IN FORMS.

Data is stored in Tables, and only in Tables. Forms *are just
windows*, tools to view and edit data stored in tables.

>I have the following code for the button on frmOrderProductsRMA
>
>Private Sub Command68_Click()
>
>Forms![frmRMA]![frmRMAParts].Form![IDNumber] = Me.IDNumber
>
>End Sub
>
>
>This codes does work but it will only copy the data into frmRMAParts
>(Datasheet) if on the datasheet it is on a new recored, If its not it
>will just write over the data


Of course. That's precisely what you are asking it to do: push data
into whatever record is currently open on frmRMAParts (whether that is
the new record or an existing record.

>What i would like to do is that every time i click the button on
>frmOrderProductsRMA
>it copys the data to a new line on frmRMAParts


What you apparently are trying to do is to *insert new records into
the Table* upon which frmRMAparts is based. The simplest way to do so
is to execute an Append query.

If you are copying multiple fields (not just the IDNumber) then your
table design needs work.


John W. Vinson[MVP]
 
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
Copy and Paste problem using continuous forms subform Nos Microsoft Access Form Coding 1 27th Mar 2009 08:01 PM
Selecting Data on Continuous Forms KontactKrap Microsoft Access Form Coding 1 10th Dec 2008 04:59 PM
Continuous forms - add data between two dates Gary Beale via AccessMonster.com Microsoft Access Form Coding 9 18th May 2005 09:15 PM
Copy record on continuous subform with pop-up forms =?Utf-8?B?TWVsYW5pZSBP?= Microsoft Access Form Coding 1 1st Jan 2005 09:45 PM
Continuous Forms -- Data Checking Jonathan Mulder Microsoft Access Form Coding 4 3rd Apr 2004 04:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:04 AM.