473,395 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

how to set page.visible to false in open or load event

My form is based on a table of grant information. It has a page for the grant application (pgeApp) and a page for the Grant award (pgeAward). I would like to make the grant award page visible only when the application status (on pgeApp) is set to "Awarded". In the AfterUpdate event for the [Application status], I check to see if the status is "Awarded" and if it is, I set the visible property of pgeAward to true, and everything works fine. When the form opens however, I need to initialize this visibiliy for the pgeAward. I am using the same logic in the Open (or Load) event, but it doesn't work. The code I use is:
Expand|Select|Wrap|Line Numbers
  1. Me![pgeAward].Visible = Me![cboApplicationStatus].Column(1) = "Awarded"
Can you tell me what I'm doing wrong, or if there is a better way to do this.

Thanks,

Gerry Goldberg
Jul 21 '10 #1

✓ answered by NeoPa

I would expect the best place to put this code would be in the Form_Current() event procedure.

I would also recommend putting the assertion within parentheses :
Expand|Select|Wrap|Line Numbers
  1. Me![pgeAward].Visible = (Me![cboApplicationStatus].Column(1) = "Awarded")

3 1787
NeoPa
32,556 Expert Mod 16PB
I would expect the best place to put this code would be in the Form_Current() event procedure.

I would also recommend putting the assertion within parentheses :
Expand|Select|Wrap|Line Numbers
  1. Me![pgeAward].Visible = (Me![cboApplicationStatus].Column(1) = "Awarded")
Jul 21 '10 #2
Great! I followed your suggestion and it worked perfectly.

Thanks for your help.

Gerry Goldberg
Jul 21 '10 #3
NeoPa
32,556 Expert Mod 16PB
No worries. A pleasure to help :)

Welcome to Bytes!
Jul 22 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Magdelin | last post by:
Hi, I have a BasePage class from which all other ASPX pages of the project is inherited. The BasePage class implements Page_Load event handler. All child pages have its AutoEventWireUp property...
5
by: Asa Monsey | last post by:
I am having a problem that the page load event fires twice in reponse to an autopostback. The first time, the IsPostBack property is true, and the second time it it false. This is causing many...
1
by: RAB | last post by:
I have a program that has the following code: <script> sub page load if not page.is postback then ... fill drop down list box .... end if
4
by: C M Shaw | last post by:
I have a form which I want to show modally; it's a fairly old form that's been ported up several versions of VB, and I'd like to keep its rewriting to a minimum. Basically, it is used in this...
5
by: DraguVaso | last post by:
Hi, I have a MDIForm with some MDIChilds. When the user clicks on the "x" in the upper right corner, I don't want the MDIChild to be closed, but the property Visible = False. So far no...
1
by: Jason Richmeier | last post by:
I am experiencing some unexpected behavior with the Form Load event in a Windows application. Hopefully, someone can explain why this behavior is occurring. In my application, I have a form...
4
by: billcute | last post by:
I have a form (frmSewer) which bounded to tblSewer. The code at the On Load Event is designed to open frmSewer is appropriate date is updated into tblFilingdatesat the end of each quarter. In...
1
by: pdm | last post by:
hoi access, I have a subreport and with the id of inheritance of OOP I like to reuse this subreport in other main reports and hide some fields. First, is this possible and second what is the...
1
by: bigijoseph | last post by:
Please help : page load event is not firing. -------------------------------------------------------------------------------- Hi, I am a new to .net. I am trying to learn it. I tried the...
4
by: Kimmo Laine | last post by:
Hi! Is there a way to generate Load-event for form without showing it? My problem is that if i try to set control states before Load is raised, control states may or may not work. Here is some...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.