Hi All, have just found and joined this forum. Bit of background - am 74yrs using m/s office pro 2003 self taught. Using access for small club database. I have a command button on a switchboard that I want to append members details to another database and then delete the record from the current database (member leaves club or is deceased). Am using a combo box to select the record to append/delete but am having a problem with vba code. Briefly -
The append bit works ok but can not get delete part to work.
Would appreciate any help
Code:
DoCmd.SetWarnings True
DoCmd.RunSQL "INSERT INTO LDMRC_Deleted_Members (Name_Prefix,First_Name,Last_Name,Address_1,Address_2,Address_3,Town,Post_Code,Tel_No,Mobile_No,E_Mail,Notes) Values ('" & Me.Combo4.Column(1) & "','" & Me.Combo4.Column(2) & "','" & Me.Combo4.Column(3) & "','" & Me.Combo4.Column(4) & "','" & Me.Combo4.Column(5) & "','" & Me.Combo4.Column(6) & "','" & Me.Combo4.Column(7) & "','" & Me.Combo4.Column(8) & "','" & Me.Combo4.Column(9) & "','" & Me.Combo4.Column(10) & "','" & Me.Combo4.Column(11) & "','" & Me.Combo4.Column(12) & "')"
DoCmd.RepaintObject
DoCmd.RunSQL "DELETE FROM LDMRC_Table1 WHERE Membership_No = ('" & Me.Combo4.Column(1) & "')"
End Sub
Would appreciate any help
Comment