Check to see how many tabs open?

Montez659

Well-known Member
Joined
May 4, 2005
Messages
918
Is there any way to check to see how many tabls are open on the main interface, and if there is more than one, make a particular form then not be pop up, and switch back if that particular form is the only one open?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
NM. MS help said the PopUp proerty can only be set in design view. Unless anyone knows of a workaround.
 
Upvote 0
I’m not really sure if you want the tables, tabs or forms to be checked, so that part I’ll leave up to you.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Regarding the property change of the form, yes there is a workaround.<o:p></o:p>

Code:
Public Sub callSetFrmProperty()
'Routine that calls the set property routine
Dim sFrmName As String
Dim blnPopUp As Boolean
sFrmName = "frmPopOrNot"
'do your table check, returns blnPopUp true or false
'call routine to set property
setFrmProperty blnPopUp, sFrmName
End Sub
Public Sub setFrmProperty(ByVal blnPopUp As Boolean, _
                          ByVal sFrmName As String)
Dim oFrm As Access.Form
'open form in design mode
DoCmd.OpenForm sFrmName, acDesign
        Set oFrm = Forms(sFrmName)
        'set properties
                With oFrm
                        .PopUp = blnPopUp
                End With
        'open form in normal mode
        Set oFrm = Nothing 
        DoCmd.OpenForm sFrmName, acNormal
 
End Sub
 
Last edited:
Upvote 0
Lol! No wonder you couldn't tell what I was looking for. I just went back and reread my post. I think I used tab, form and table all interchangeably! Thats Friday for ya! :)

Anyways, was just needing to check to see if there were forms open. I appreciate the code and I will give it a shot. Might be sometime next week before I get to mess around with it. I will let you know if it works out.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,875
Members
452,949
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top