Wow! That was speedy! - I have tried as you suggested but as the procedure requests a 'Goto Control' I get a message that tells me that I must save the field before the 'Goto control' can be acrried out..
This is my code - it basically copies and pastes important data into a text box (temporarily) when the 'Last Name' field is changed. When the data input is complete the user clicks on the 'UPDATE' label (which becomes visible when the 'Last Name' field data is changed). Clicking on the 'UPDATE' label runs a macro which cuts the data from the text box and pastes it into a form, inputting a date etc. so it's a kind of chronological record of changes made to the database...Phew!!
----------------------------------
Private Sub LastName_BeforeUpdate(Cancel As Integer)
' Attached to After Update property of Last Name field
DoCmd.GoToControl "SN"
' Go to the beginning of the field
SendKeys "{Left 10}", True
' Select up to 30 characters
SendKeys "+{Right 10}", True
' Copy
SendKeys "^c", True
' ClipboardForm
DoCmd.GoToControl "ClipboardForm"
' Arrow right 200
SendKeys "{RIGHT 200}", True
' Paste the SN
SendKeys "SN ^v ", True
DoCmd.GoToControl "FirstName"
(blah blah blah, collecting data from several fields as above)
[Forms]![Master Input Edit]![Cover1].Visible = True
[Forms]![Master Input Edit]![Cover2].Visible = True
[Forms]![Master Input Edit]![Update Label].Visible = True
[Forms]![Master Input Edit]![New Data Label].Visible = True
End Sub
---------------------------------------
This works OK on it's own but then when I want to copy a record with similar details I use a macro that first duplicates the record and then deletes the 'First Name' and 'Last Name' fields so that the new names can be input. As soon as the Last Name is deleted though, the above event procedure runs and causes an error. What I really need to do is to have something cancel the above event procedure whenever the 'Copy Record' macro is called and reinstate it when data is typed into the fields.....Confused??
Is this at all possible?
Thanks again for your response!!