set WindowMode:=acDialogwhen you initiateDoCmd.OpenForm
Here's how to do it from other Office VBA (Excel, Word, VB6, VB.Net) Call a form using the following code
Dim f as new FormNameHere
f.Show True 'True is the option for Dialog in VB
' form will be displayed until the user dismisses it then execution continues
set f = Nothing
Otherwise:
f.ShowDialog
Ahmad source
share