>I seem to have no problems using:
>Private Sub Form_QueryUnload(Cancel As Integer, _
>UnloadMode As Integer)
> Me.Hide
> frmMain.Show
>End Sub
>A few question, though. Do you want every displayed form to be modal? Is
>your last form modal and not your first, or vise versa?
>Howard Henry Schlunder
>> Hi,
>> I've come up against a problem closing forms which I just can't seem
>> to work around.
>> I have an application using 12 forms. Instead of loading them all at
>> run time, I load one form at a time, then unload it when I need to
>> load the next form:
>> i.e.
>> Unloaad FormX
>> Set FormX = nothing
>> Load FormY
>> FormY.Show vbModal
>> Now, I can load and unload forms using code similar to that above when
>> attached to command buttons or menu entries.
>> However, I want to use the close [x] button to unload the current form
>> and load the start-up form, instead of terminating the entire
>> application.
>> Is this possible (it must be) ? I have been using various permutations
>> of
>> Query_Unload, but I usually end up with either two forms showing, or
>> the application terminating.
>> Can anyone help with this ?
>> Thanks
>> Neil