Re: GUI for access 2002



On Tue, 31 Oct 2006 23:39:10 GMT, "TED MEDIN" <mmaphq@xxxxxxxxxxx>
wrote:

Dialog form would fit what we are currently doing. However, I have no idea
how to open a dialog form.

This is what the vba code looks like:

docmd.openform formname,,,stlinkcritera ' have no idea what
stlinkcritera does
while isformopen(formname) then
strtmp=[form]![formname]![text0] & ""
...
doevents
wend

stLinkCriteria is an optional argument which specifies which records
are displayed on the Form. If it's blank you'll see the entire
Recordsource of the form; if it's a valid SQL WHERE clause (without
the word WHERE) you'll see just the records which match that
criterion.

If you use

DoCmd.OpenForm formname, WindowMode:=acDialog

it will open the form in dialog view. The execution of your code will
STOP - no additional lines will be executed until either the form is
closed or is made invisible. There's no need for the While...Wend
loop.

You might want to look at the VBA Help file for the OpenForm method;
there are a number of optional arguments which you may find useful.

John W. Vinson[MVP]
.



Relevant Pages

  • Re: Disable VBA code execution when loading a workbook
    ... > How do I control the execution of the VBA Code in a spread sheet when I ... > load the workbook. ...
    (microsoft.public.excel.misc)
  • Disable VBA code execution when loading a workbook
    ... How do I control the execution of the VBA Code in a spread sheet when I first ... load the workbook. ...
    (microsoft.public.excel.misc)
  • Re: Keeping Access Open
    ... Does that cause VBA code to stop execution at that point until Access is ... I have this sub on ms outlook. ... You need to hand off the application to user control: ...
    (microsoft.public.access.gettingstarted)
  • VBA to add one to columns on condition
    ... I am looking for some VBA code that will add one to Column B when executed. ... reset column B to 0. ... April 2009 After Macro Execution ...
    (microsoft.public.excel.programming)