Connecting Tech Pros Worldwide Forums | Help | Site Map

Determining whether an open form is being displayed in form view?

MLH
Guest
 
Posts: n/a
#1: Jun 16 '06
I use the following in A97 to tell if a form is open:

If IsNull(TheForm) Then Exit Function
IsFormOpen = SysCmd(acSysCmdGetObjectState, acForm, TheForm)

Is there a way I can tell if it is open in Form View?

Allen Browne
Guest
 
Posts: n/a
#2: Jun 16 '06

re: Determining whether an open form is being displayed in form view?


Test the CurrentView property of the form.
1 is Form view.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"MLH" <CRCI@NorthState.net> wrote in message
news:lj759251fubti2nrlv59et5rsji2q2frbv@4ax.com...[color=blue]
>I use the following in A97 to tell if a form is open:
>
> If IsNull(TheForm) Then Exit Function
> IsFormOpen = SysCmd(acSysCmdGetObjectState, acForm, TheForm)
>
> Is there a way I can tell if it is open in Form View?[/color]


MLH
Guest
 
Posts: n/a
#3: Jun 16 '06

re: Determining whether an open form is being displayed in form view?


On Fri, 16 Jun 2006 20:28:04 +0800, "Allen Browne"
<AllenBrowne@SeeSig.Invalid> wrote:
[color=blue]
>Test the CurrentView property of the form.
>1 is Form view.[/color]

I tried this ===>
Dim frm As Form
Set frm = Forms(frmCreateInvoice)
If frm.CurrentView <> 1 Then
MsgBox "frmCreateInvoice is not displaying in form view"
End If

Worked great. Thanks!
Closed Thread