UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Creating a Back Button for a custom wizard    
 
   
BeckyMcE
post May 6 2005, 01:31 PM
Post #1

New Member
Posts: 2



I have been searching for this and found several ideas to try but haven't had any luck.

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? (IMG:http://www.utteraccess.com/forum/style_emoticons/default/crazy.gif)
Go to the top of the page
 
+
strive4peace
post May 7 2005, 02:28 PM
Post #2

UtterAccess VIP
Posts: 20,211
From: Colorado



after you delete the child records...

try this:

currentdb.tabledefs.refresh
DoEvents

after you are sure the records are "deleted" from the children

let me know if your parent record can be deleted then...
Go to the top of the page
 
+
BeckyMcE
post May 9 2005, 02:21 PM
Post #3

New Member
Posts: 2



The refresh helped. I also took a break from it and when I came back I did notice an error in one of my queries which also helped. It's working now thanks! The issue of staring at the same thing too long but I think I'll continue to use the refresh just in case. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/yayhandclap.gif)
Go to the top of the page
 
+
strive4peace
post May 9 2005, 06:34 PM
Post #4

UtterAccess VIP
Posts: 20,211
From: Colorado



you're welcome (IMG:http://www.utteraccess.com/forum/style_emoticons/default/wink.gif) happy to help
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 05:31 AM