I'm trying to create a custom wizard for some very basic users and don't have a lot of time. Haven't been doing a lot of serious programming in a while either but am getting better at VBA.
I have a wizard with next buttons which typically run append queries as they go as several points of data in subforms are the same from form to form. However I want to be able to create a back button for the same forms in case they want to undo. Me.undo works great if the record isn't saved but if it is saved I can not get rid of the parent record.
I can attach a query that deletes the child records in the subform just fine. However if I try to run a delete query on the parent record I get an Access violation error. I have tried to use unbound hidden text boxes on my startup form which stays open at all times and then run a delete query on the activate action of the form the back button is returning to but I still get the access violation error message.
Have also tried accmddeleterecord in the on unload event of the form that owns the back button but get the same messsage.
Ideas?