forms - MS Access OpenForm acDialog option does not seem to work -


this

docmd.openform fnew, , , , , acdialog 

doesn't seem stop code execution reason. because i'm calling function has method function , messing up? e.g.

func1 <code> call func2     <func2 code>     docmd.openform fnew, , , , , acdialog <back func1 code executes though dont want until form closes> 

with acdialog openform windowmode parameter, calling code should not continue until form closed.

it should not matter openform takes place in procedure called code. in example, when running func1, msgbox not displayed until form closes.

public function func1()     call func2     msgbox "form closed" end function  public function func2()     'docmd.openform "form3", , , , , acdialog     docmd.openform "form3", windowmode:=acdialog end function 

note code operates described long form not open. if it's open in design view, calling openform switches form view without applying acdialog. if open in form view, nothing happens, means acdialog not applied either.

if want guarantee acdialog applied, make sure form closed before calling openform ...

public function func2()     const cstrform string = "form3"     if currentproject.allforms(cstrform).isloaded         docmd.close acform, cstrform     end if     'docmd.openform cstrform, , , , , acdialog     docmd.openform cstrform, windowmode:=acdialog end function 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -