Liv Manto
08-17-2001, 01:28 PM
I have a button for a new record
dim x as string
me.name = x
docmd addnew
x=me.name
I however have 19 data to copy, different types.
Anything else easier and shorter?
I have to do it in 20 forms, different data.
Jack Cowley
08-17-2001, 01:39 PM
Where is the new data coming from?
Liv Manto
08-17-2001, 01:46 PM
Dear Jack Cowley.
from the current record of the same form. See the user is lazy to enter the data if it's the same as the last one. So I'm giving her this option.
SO from Current record - me.name
Open new record
me.name is now on another record
Jack Cowley
08-17-2001, 05:18 PM
Liv -
I think this is just what you need... This code is for Access2000 but will work for Access97 if that is what you are using...
http://support.microsoft.com/support/kb/articles/Q210/2/36.ASP?LN=EN-US&SD=gn&FR=0&qry=q210236&rnk=1&src=DHCS_MSPSS_gn_SRCH&SPR=ACC2000
Good luck!
Jack
Liv Manto
08-17-2001, 05:58 PM
Ouch. I was trying to avoid cloning a recordset.
I was thinking I could do a shortcut
x= me.recordset
docmd addnew
me.recordset = x
But of course it was giving me an error. I guess there is no other way then.
Thanks Jack.
Jack Cowley
08-17-2001, 06:21 PM
No other way that I am aware of. The more work you do on your side of the database will just make it that much easier on the users side. Unfortunately they will probably not appreciate what you have done but that is really a compliment to you and your programming skills....
joeyreyma
08-17-2001, 07:07 PM
you can run an append query having criteria of the current record of the form when you clicked the duplicate button, then go to that new appended record. but make sure you have good control of the primary fields.