Pop up form

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Pop up form

Post by D Willett »

On one of my forms "frmWIP" which is popup and not modal, I have a timer event to requery several subforms

Code: Select all

Private Sub Form_Timer()

    [sbfInProgressWithECD].Requery
    [sbfCompletedToday].Requery
    [sbfCountOfCompletions].Requery
    [sbfInProgressTBA].Requery
    [sbfInProgressECDB4].Requery
    [sbfInProgressMon].Requery
    [sbfInProgressTues].Requery
    [sbfInProgressWeds].Requery
    [sbfInProgressThurs].Requery
    [sbfInProgressFri].Requery
    [sbfInProgressSat].Requery
    Me.Refresh
    Me.txtStop.SetFocus
      
End Sub
This works ok and does what it says it should do.
However, sometimes after the requery the database window shows in front of the form "frmWIP" which is quite annoying.
If I select the Access icon from the task bar on the desktop it reappears.
I've had a look around for a fix for this and can't find really much info. frmWIP is the main display form and should always be visible.

Does anyone know a fix for this?

Kind Regards
Cheers ...

Dave.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pop up form

Post by HansV »

Does it help if you add a line

Me.SetFocus

at the end of the code?
Best wishes,
Hans

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Re: Pop up form

Post by D Willett »

Hi Hans

It worked on this PC which full Microsoft Access installed. The PC which will eventually be used to run the application (display PC) shows the database window still after re-query. The only difference is the display PC has the runtime version instead of the full Microsoft Access installed.

Very annoying...........
Cheers ...

Dave.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pop up form

Post by HansV »

What if you set the Modal property of the form to Yes?
Best wishes,
Hans

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Re: Pop up form

Post by D Willett »

Hmmm.. same issue. My PC is ok but the display PC shows the db window after refresh.. very strange:
You do not have the required permissions to view the files attached to this post.
Cheers ...

Dave.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pop up form

Post by HansV »

Very strange indeed. I'm afraid I'm stumped.
Best wishes,
Hans

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Re: Pop up form

Post by D Willett »

Yes, very odd. I'm going to uninstall the runtime and reinstall. I made a accde which wouldnt run due to runtime version. This may be the answer !!!
Thanks for looking into this Hans. Much appreciated.

Have a great weekend :-)
Cheers ...

Dave.

D Willett
SilverLounger
Posts: 1728
Joined: 25 Jan 2010, 08:34
Location: Stoke on Trent - Staffordshire - England

Re: Pop up form

Post by D Willett »

Fixed it. It was the runtime version. Removed 2010 and installed 2013. It's very happy now.

Regards
Cheers ...

Dave.

User avatar
HansV
Administrator
Posts: 78236
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Pop up form

Post by HansV »

Great news! Have a good weekend!
Best wishes,
Hans