Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / April 2007

Tip: Looking for answers? Try searching our database.

cloning a record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scubadiver - 30 Apr 2007 08:30 GMT
I am using the following code in a button on the form to clone a record in
the subform.

With Me![Employee subform].Form.RecordsetClone
    .AddNew
    !EmployeeID = Me![Employee subform].Form![EmployeeID]
    !Dept = Me![Employee subform].Form![Dept]
    !Subdept = Me![Employee subform].Form![Subdept]
    !Wage = Me![Employee subform].Form![Wage]
    !HrsWrk_basic = 36
    .Update
End With

I want to change the code so that it can be used in an update event in the
subform. I appreciate it can't be that difficult but not too sure how to
change the first line.

thanks
Scott McDaniel - 30 Apr 2007 11:31 GMT
>I am using the following code in a button on the form to clone a record in
>the subform.
[quoted text clipped - 12 lines]
>subform. I appreciate it can't be that difficult but not too sure how to
>change the first line.

Change any of these:

Me![Employee subform].Form

to just

Me

So  Me![Employee subform].Form![EmployeeID] would become  Me![EmployeeID]

>thanks

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
scubadiver - 30 Apr 2007 11:42 GMT
thanks for the clarification. Its the first line I'm not sure about.

"With Me![Employee subform].Form.RecordsetClone"

> >I am using the following code in a button on the form to clone a record in
> >the subform.
[quoted text clipped - 28 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com
Scott McDaniel - 30 Apr 2007 12:08 GMT
>thanks for the clarification. Its the first line I'm not sure about.
>
>"With Me![Employee subform].Form.RecordsetClone"

That should be Me.RecordsetClone

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
scubadiver - 30 Apr 2007 13:26 GMT
What I had intended isn't quite working. I will put it in a new message.

> >thanks for the clarification. Its the first line I'm not sure about.
> >
[quoted text clipped - 5 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com
scubadiver - 30 Apr 2007 13:30 GMT
I won't start a new message. I think my problem can be solved a bit more
easily.

Thanks for the heads up.

> >thanks for the clarification. Its the first line I'm not sure about.
> >
[quoted text clipped - 5 lines]
> scott@takemeout_infotrakker.com
> www.infotrakker.com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.