Hi Liveson,

>1. Create variables to hold the current data on the form.
>2. Go to the new record: DoCmd.GoToRecord , , acNewRec
>3. Paste the data held in the variables into the textboxes on the form

Can you give me the exact and complete code to do these actions?
(columns in the table are FieldA, FieldB and FieldC)

 > The other way is to use an append query which should append the current 
record >into the record source

I am not able to tell it to use only the current record... if I use this 
way it appends each time all the records in te table...

Thanks
Arnaldo.


>Arnaldo
>There might be a better way of achieving your goal but I think the 
>following simple method may also assist in some way. Place a command 
>button with the label "Copy" or anything meaningful on your form. In the 
>OnClick event of this button do the following
>
>1. Create variables to hold the current data on the form.
>2. Go to the new record: DoCmd.GoToRecord , , acNewRec
>3. Paste the data held in the variables into the textboxes on the form
>
>You can now edit your data before saving the record. The new record is not 
>saved until you move away from it or close the form so you have a chance 
>of changing the primary key. The other way is to use an append query which 
>should append the current record into the record source and then after 
>refreshing the form go to the end of the record set to view the appended 
>record but the problem lies with the primary key if there is one. Unless 
>you change the primary key before appending the record the query will fail.
>
>Good luck
>Liveson
>
>
> > Hi List,
> >
> > I am working with an input form. I use this form to browse data too.
> > When I see an interesting record I want to duplicate it automatically and
> > change some data.
> > I think that I can do this with a query but I don't know how.
> > I also can use the menu' for selecting the current record>copying in the
> > clipboard>appending it in the end of the table. But I want to do this with
> > only one action, so I need to create a routine in VBA. I don't know the
> > right code and Access has not a macro recorder like Excel...
> > Anyone can help me?
> >
> > TIA
> > Arnaldo.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to