Custom Back Button on Custom Wizard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have most of a custom wizard working and can use unbound text boxes on a
startup form to help me keep track of things for my next button.

However even though I can get the back button to go back to the previous
form and close the existing form, I can not get the back button to delete the
saved record.

I can undo an unsaved record but if I use back on a saved record I can not
delete! I have tried many things including running a delete query based on
Formno saved in a hidden unbound text box on my startup form. Tried delete
query in onunload and on deactivate to no help. Also tried accmddelete in on
unload and ondeactivate to no help.

If my users hit a back button on a saved record where am I going to put the
event to delete the saved record (usually incomplete) and which method am I
going to use?
 
Hi Becky,

It shouldn't matter where you place the code to delete the record provided
that it is firing prior to a form or method going out of scope. Here are a
couple of things that I would suggest.

1) Set a breakpoint on the Back button that you are talking about and see if
that is the case. If the breakpoint doesn't stop code execution, then the
method you are calling to execute the delete query is not firing.

2) If the query that you are trying to call is in code, copy it into a new
query object and see if you can get it to delete the record explicitly by
using a record number that you know is in the database. If it doesn't delete
the record than your SQL code may be a incorrect. If it does delete it, then
the event is probably not being fired (see above).

3) Failing that, reply to this post and paste the code that you are using so
that we can get a better glimpse of what is going on so we might be able to
help.

Good luck!

Lance
 
BeckyM said:
I have most of a custom wizard working and can use unbound text boxes
on a startup form to help me keep track of things for my next button.

However even though I can get the back button to go back to the
previous form and close the existing form, I can not get the back
button to delete the saved record.

I can undo an unsaved record but if I use back on a saved record I
can not delete! I have tried many things including running a delete
query based on Formno saved in a hidden unbound text box on my
startup form. Tried delete query in onunload and on deactivate to no
help. Also tried accmddelete in on unload and ondeactivate to no
help.

If my users hit a back button on a saved record where am I going to
put the event to delete the saved record (usually incomplete) and
which method am I going to use?

Foe wizards I use a single form with a TabControl (Style = None) and my
[Next] and [Back] buttons just change the TabPages. Lots easier than
opening and closing different forms.
 
Back
Top