Form as dialog box

  • Thread starter Thread starter Maileen
  • Start date Start date
M

Maileen

Hi,

I would like to know if exist in Access 2000 a way how to force user to
fill a form, avoiding him to switch to another form.

something like a dialog box but based on my custom form ?

thanks
Maileen
 
Yes. One way is to use the acDialog window mode argument in the
DoCmd.OpenForm call. Another is to set the properties of the form in its
Properties sheet. The DoCmd.OpenForm call will override these properties
that are set in the Properties sheet, so if you're opening the form through
code, you'll need to use the acDialog argument. Also, opening a form with
the acDialog argument will cause the code that made this call to pause until
the form is closed or hidden (visible=False). The command doesn't work on a
form that is already open, so if you hide the form you need to close it
before you call it again using acDialog.
 
One way would be to declare a global boolean, set it to
false outside of the mandatory form and only set it to true
in the form when the work has been done. Then you can
include the open form sommand within a do or while loop e.g.
gboolFormCompleted = False
Do Until gboolFormCompleted
DoCmd.OpenForm "mandatoryFormName",,,,,acDialog
Loop

Hope This Helps
Gerald Stanley MCSD
 
Back
Top