A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Question on frames and msgbox



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 23rd 06, 11:39 PM posted to microsoft.public.outlook.program_forms
Jade
external usenet poster
 
Posts: 5
Default Question on frames and msgbox

Hi Everyone,

How do you code to make a frame within a form visible/hidden. I've
composed a code that when a user selects the form a message box opens
asking them if they would like to do this or that (if they answer THIS
then Frame A is visible.....if they answer That then Frame B is
visible)...bottomline both cannot be visible at the same time.

Please help....
Function Item_Open()
IntAns=MsgBox("Would you like to open a new account",_
vbQuestion+vbYesNo,"Account Request")
If IntAns=vbYes then
Set fraAcctOpen.Visible=True
Else
If IntAns=vbNo then
Set fraAcctChange.Visible=True
End If
End If
End Function

I realize there is something wrong with this code since i get the
question but when you reply well both frames appear which isn't
correct.

If anyone can offer me any guidance I'd greatly appreciate it.

Regards,
Jade

  #2  
Old April 24th 06, 03:34 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Question on frames and msgbox

You must properly reference the controls, based on which custom page they
live on. See http://www.outlookcode.com/d/propsyntax.htm

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jade" wrote in message
oups.com...
Hi Everyone,

How do you code to make a frame within a form visible/hidden. I've
composed a code that when a user selects the form a message box opens
asking them if they would like to do this or that (if they answer THIS
then Frame A is visible.....if they answer That then Frame B is
visible)...bottomline both cannot be visible at the same time.

Please help....
Function Item_Open()
IntAns=MsgBox("Would you like to open a new account",_
vbQuestion+vbYesNo,"Account Request")
If IntAns=vbYes then
Set fraAcctOpen.Visible=True
Else
If IntAns=vbNo then
Set fraAcctChange.Visible=True
End If
End If
End Function

I realize there is something wrong with this code since i get the
question but when you reply well both frames appear which isn't
correct.

If anyone can offer me any guidance I'd greatly appreciate it.

Regards,
Jade


  #3  
Old April 24th 06, 09:03 PM posted to microsoft.public.outlook.program_forms
Jade
external usenet poster
 
Posts: 5
Default Question on frames and msgbox

Hi Ken,

ok...tried this

Function Item_Open()
Set myInspector=Item.GetInspector
Set myPage1=myInspector.ModifiedFormPages("Customer Number Request")
Set fraAcctChange=myPage1.Controls("fraAcctChange")

IntAns=MsgBox("Would you like to open a new account",_
vbQuestion+vbYesNo,"Account Request")
If IntAns=vbYes then
fraAcctChange.Visible=True
Else
strMsg="Hello"
End If
End Function

not having much luck...help...please

  #4  
Old April 24th 06, 11:52 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Question on frames and msgbox

What's not working? Do you get the message box?

If you step the code do you get the intermediate Inspector object and
ModifiedFormPages collection and the final frame control?

You can also put in MsgBox statements for troubleshooting:

MsgBox myInspector.Caption
MsgBox myInspector.ModifiedFormPages.Count
MsgBox myPage1.Caption
MsgBox fraAcctChange.Caption

See where you're losing things.

Also, just a shot, but see if using explicit Item properties instead of
relying on the default property works any better:

Set myPage1=myInspector.ModifiedFormPages.Item("Custom er Number Request")
Set fraAcctChange=myPage1.Controls.Item("fraAcctChange ")

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jade" wrote in message
oups.com...
Hi Ken,

ok...tried this

Function Item_Open()
Set myInspector=Item.GetInspector
Set myPage1=myInspector.ModifiedFormPages("Customer Number Request")
Set fraAcctChange=myPage1.Controls("fraAcctChange")

IntAns=MsgBox("Would you like to open a new account",_
vbQuestion+vbYesNo,"Account Request")
If IntAns=vbYes then
fraAcctChange.Visible=True
Else
strMsg="Hello"
End If
End Function

not having much luck...help...please


  #5  
Old April 26th 06, 04:12 AM posted to microsoft.public.outlook.program_forms
Jade
external usenet poster
 
Posts: 5
Default Question on frames and msgbox

Hi Ken,

You must have wings on your back because you're definitely an
ANGEL...thank you for the troubleshooting statements...it was all I
needed to discover the problem.

Form is working fabulously.

Thanks!!!!

Jade

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
An Easy Question: How to get a "msgbox" to display? Bernie Outlook and VBA 2 March 30th 06 09:55 PM
An Easy Question: How to get a "msgbox" to display? Bernie Outlook and VBA 0 March 29th 06 11:19 PM
OE question Bobby28 Outlook - Installation 0 March 27th 06 11:17 PM
How can I suppress annoying msgbox "enter network password"? maysider Outlook - Installation 2 February 16th 06 03:04 AM
question manish goyal Outlook and VBA 1 January 21st 06 10:09 AM


All times are GMT +1. The time now is 08:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.