Code keeps running after opening form

Allard

New member
Local time
Today, 07:59
Joined
Sep 14, 2015
Messages
5
Hi,

I have something that I have never seen before. I open a second form to which I pass an openargs argument. The code from form A =
Code:
oCmd.OpenForm "FrmPlanningPerMW", acNormal, , , acFormReadOnly, acDialog, StrMw

StrMW is the openargs argument I pass on.

In the form load event on form B the following code is put
Code:
Private Sub Form_Load()
Me.tbMW = Me.OpenArgs
lstPlanning_requery
End Sub

Now the code works as to showing the information I want. It loads the list with relevant data. But somehow the code keeps running and only stops after form B is closed. And this is a tiny problem because there are some functions on Form B which now do not work.

Maybe someone here can help me.

Greetings Allard
 
I think you'll find that is because you are opening the form as Dialog so code in that sub is halted until the opened form is closed.
 
I think you'll find that is because you are opening the form as Dialog so code in that sub is halted until the opened form is closed.

Well Bob,
This wasn't a test but I suddenly saw the solution. 'AcReadOnly' was standing in the way. It wasn't the dialog (thank god, I hate full screen). Thanks a million for your reply as it made me look at the code once more once.
 

Users who are viewing this thread

Back
Top Bottom