Re: Duplicate the record in form and subform
- From: Beetle <Beetle@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 15 Dec 2007 13:21:00 -0800
Whatever method you're using to create your PK is going to have to be done
programmatically in your code i.e.
With Me.RecordsetClone
.AddNew
![PK field] = some value
!CustomerID = Me.CustomerID
!EmployeeID = Me.EmployeeID
!OrderDate = Date
'etc for other fields.
.Update
--
_________
Sean Bailey
"Andy" wrote:
Hi Allen,.
Sorry for the typo error on the field name! Have corrected but another error
message is "error#3058, primary key value can not be null" caused by below
line :
.update
Have mentioned that my primary key value is not a autonumber, please advise
how to change the code to fit my database.
Thanks again!
"Allen Browne" wrote:
Presumably we are talking about this article:
http://allenbrowne.com/ser-57.html
The "Item not found" error was caused by which line?
Whichever line it is, you have some name Access can't identify, e.g. you
have not changed the field names to match what's in your form.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Andy" <Andy@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F433142D-F96C-41EC-AD9F-8408A6D669A4@xxxxxxxxxxxxxxxx
Hi Allen Browne,
I try to use your code to duplicate the record in form and subform but I
got
a error message "Error#3265". BTW, my primary key value is not autonumber,
how to change the code to fit my database?
Thanks for your expert comments in advance!
- Follow-Ups:
- Re: Duplicate the record in form and subform
- From: Allen Browne
- Re: Duplicate the record in form and subform
- References:
- Re: Duplicate the record in form and subform
- From: Allen Browne
- Re: Duplicate the record in form and subform
- Prev by Date: Re: Prevent on Exit code when form is closed
- Next by Date: Can't stop user from editing form
- Previous by thread: Re: Duplicate the record in form and subform
- Next by thread: Re: Duplicate the record in form and subform
- Index(es):
Relevant Pages
|