On 6 Oct 2006 16:36:15 -0700, "(E-Mail Removed)" <(E-Mail Removed)>
wrote:
>It gives me a validation rule error. Some fileds that I would like to
>leave blank while copying are required. Is there a way to copy the
>selected record into a memory, populate the fields into the form and
>then save it as a new record?
Sure, bit it's a bit more work. You'll need to copy each control's
value into a variable, move to the new record, and copy back into the
controls:
Dim vThis As Variant, vThat As Variant, vTheOther As Variant
vThis = Me!txtThis
vThat = Me!txtThat
vTheOther = Me!cboTheOther
DoCmd.GoToRecord acForm, Me.Name, acNewRecord
Me!txtThis = vThis
Me!txtThat = vThat
Me!cboTheOther = vTheOther
John W. Vinson[MVP]
|