I have a form which opens as a pop up when the system starts. On here are several buttons, which open other forms.
Some of these just open another form and the user starts using the system, other close that form and open another one, and take go further into the structure of the system, then the forms that open have the same etc.
For each of the buttons the code is very similar;
For forms that open another one and don't close the main form:
for those that close the form:
Just the main of the form it opens changes, and sometimes with ,,,dialog in the options if its required.
The opening part works every time without fail, but the form doesn't always close and I end up with two forms open instead of one. If I close the newly opened one and press the button again it works fine. This is purely random and only started a few days ago, up until then it has been working fine.
There is a hidden form that is open as well when the system starts, which check for something on a timer event every 60 seconds. If that event is firing would the focus shift to the hidden form, between me pressing the button and the event firing and the hidden form is getting closed? then the new form opening?
I can't it been that myself as it happens a lot, many times a day, and the timing would have to be spot for that to happen.
Anyone have any ideas?
Some of these just open another form and the user starts using the system, other close that form and open another one, and take go further into the structure of the system, then the forms that open have the same etc.
For each of the buttons the code is very similar;
For forms that open another one and don't close the main form:
Code:
Private Sub cmdescalations_Click()
DoCmd.OpenForm "frmEscalations"
End Sub
for those that close the form:
Code:
Private Sub cmdStock_Click()
DoCmd.Close acForm, Me.Name, acSaveNo
DoCmd.OpenForm "frmMain_Stock"
End Sub
Just the main of the form it opens changes, and sometimes with ,,,dialog in the options if its required.
The opening part works every time without fail, but the form doesn't always close and I end up with two forms open instead of one. If I close the newly opened one and press the button again it works fine. This is purely random and only started a few days ago, up until then it has been working fine.
There is a hidden form that is open as well when the system starts, which check for something on a timer event every 60 seconds. If that event is firing would the focus shift to the hidden form, between me pressing the button and the event firing and the hidden form is getting closed? then the new form opening?
I can't it been that myself as it happens a lot, many times a day, and the timing would have to be spot for that to happen.
Anyone have any ideas?