Open Borderless form using acDialog

smig

Registered User.
Local time
Today, 21:39
Joined
Nov 25, 2009
Messages
2,209
I'm trying to open a form as borderless (this how the form is set) but if I add the acDialog option to the DoCmd.OpenForm it open with the border.
I need it to open using the acDialog option to halt the code untill I close this form.
If I don't use this option the code continue to run to the end of the sub even though the opened form is set to be Modal and PupUp :eek:

I need to halt the code so I can use selections made on the opened form.

Thanks,
Tal
 
One way - create a boolean variable and put it in a standard module's General Declarations section.
Code:
Public blnKeepOpen As Boolean
And then in the dialog form's UNLOAD event put

Code:
blnKeepOpen =  False

And in the form which calls the dialog form, in the event that opens the form put this in that code just before that form is opened in that code:
Code:
blnKeepOpen = True
and then just AFTER the code which opens the dialog form put:
Code:
Do Until blnKeepOpen = False
   DoEvents
Loop
 
Last edited:
Thanks bob

what I don't like is this part, as it will keep running till form is closed and put the CPU in high load
Code:
Do Until blnKeepOpen = False
   DoEvents
Loop

as ths form I'm talking about is a calendar form, I thought doing it in other way:
Sending the field I want to update (Either as public variable or using the calendar's form OpenArgs) and letting it to update the field just before it closed.


And another question:
I open the calendar from a Modal+PopUp form.
Tried having the Calendar open all time and only set it's Visible property to true/False as needed (To prevent the constantly Open/Close events of the form) but it will show under the form called it 9Calendar itself is also set to be Modal+PopUp)

*** edit ***
another question - is it possible to send a command to perform as a string (using the OpenArgs)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom