Creating a simple wizard with forms

torok

Registered User.
Local time
Today, 08:46
Joined
Feb 3, 2002
Messages
68
Hi all,

I want to make my own little wizard to create invoices. The first form should ask for an invoice number and have "Next" and "Cancel" buttons. The next form should ask for a PO number, and the next form should display a list of orders to add to the invoice. The last form will give the options of printing the invoice, creating another invoice, or canceling everything.

Has anybody done this? Any ideas on the best way to proceed? Opening the forms is easy - storing the data entered into each form is more difficult (I'm not used to VB)...

Thanks!


[This message has been edited by torok (edited 05-30-2002).]
 
Base each form on your table you want to store things in. Because you're doing it in stages, you'll have problems if you try to make too many fields Required.

Then use Access help's "Synchronize records between two forms" to see how to open a new form to the same record as an old form.
 
I've done a multi-step wizard before... not exactly like what you described, but close.

I created a "main" form with a header & footer, then added a 'step' field, back and next buttons in the footer, and a label in the header. The 'step' field has an initial value of zero...

Then I created a subform for each step required in the wizard and placed them all on the detail section of the main form, but not visible. Then each time the user completes a step and clicks Next, the following scenario occurs:

1. Subform 1's data is saved (or in your case could be saved as variables)
2. Subform 1's visible property is set to false
3. Subform 2's visible property is set to true
4. The step field's value is incremented by 1 to indicate that the user is on step X of Y
5. The header label's caption is changed to display information about the new subform

So the same procedure happens in reverse when the Back button on the wizard is clicked.
 
so now the question is... is there a wizard for building the wizard building wizard?
wink.gif
 
Thanks everyone for the replies! Good suggestions. I think I'll go with jatfill's suggestion and use the subforms - seems like a good idea, and I can keep all the info in variables until the user decides to save changes =)

Too bad there's no wizard-building wizard for Access 2000.....
 

Users who are viewing this thread

Back
Top Bottom