I'm trying to make a copy button and a paste button to reproduce some of the details from an existing record to a new record so i dont have to fill in the fields again if it is he same person, i have got it to work great provided there is some text in the field, i get a null error if one f the fields is null, can anyone tell me if theres something i need to put for it to ignore empty fields. The VBA code i have at present is this...
This code for the copy button....
Private Sub CopyRecord_Click()
Me.FirstName.Tag = Me.FirstName
Me.LastName.Tag = Me.LastName
Me.HouseNumber.Tag = Me.HouseNumber
Me.PostCode.Tag = Me.PostCode
Me.Telephone.Tag = Me.Telephone
Me.Mobile.Tag = Me.Mobile
Me.Email.Tag = Me.Email
This code for the paste new record button..
Private Sub PasteRecord_Click()
DoCmd.GoToRecord , , acNewRec
Me.FirstName = Me.FirstName.Tag
Me.LastName = Me.LastName.Tag
Me.HouseNumber = Me.HouseNumber.Tag
Me.PostCode = Me.PostCode.Tag
Me.Telephone = Me.Telephone.Tag
Me.Mobile = Me.Mobile.Tag
Me.Email = Me.Email.Tag
End Sub
any help greatly appreciated. Thanks
This code for the copy button....
Private Sub CopyRecord_Click()
Me.FirstName.Tag = Me.FirstName
Me.LastName.Tag = Me.LastName
Me.HouseNumber.Tag = Me.HouseNumber
Me.PostCode.Tag = Me.PostCode
Me.Telephone.Tag = Me.Telephone
Me.Mobile.Tag = Me.Mobile
Me.Email.Tag = Me.Email
This code for the paste new record button..
Private Sub PasteRecord_Click()
DoCmd.GoToRecord , , acNewRec
Me.FirstName = Me.FirstName.Tag
Me.LastName = Me.LastName.Tag
Me.HouseNumber = Me.HouseNumber.Tag
Me.PostCode = Me.PostCode.Tag
Me.Telephone = Me.Telephone.Tag
Me.Mobile = Me.Mobile.Tag
Me.Email = Me.Email.Tag
End Sub
any help greatly appreciated. Thanks