473,385 Members | 1,764 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,385 software developers and data experts.

Problem making things visible

Here's my code:
If Me![Gender] = "Male" Then
Me.[B1].Visible = Me.[age] < 13
Me.[B3].Visible = Me.[age] 12

Else
Me.[B2].Visible = Me.[age] < 13
Me.[B4].Visible = Me.[age] 12
End If

I'm to get it so that if the person is (1st) male and (2nd) under 13 textbox
B1 is shown, and if the're >12 then B3 is shown. The else part is if the're
female with the same age groups.

The problem is that code works for "male", but when "female" is chosen, the
correct "female" box is shown along with both "male" boxes.
What do I need to change?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200804/1

Apr 1 '08 #1
2 1251
On Tue, 01 Apr 2008 19:16:24 GMT, "noe1818 via AccessMonster.com" <u39419@uwe>
wrote:
>Here's my code:
If Me![Gender] = "Male" Then
Me.[B1].Visible = Me.[age] < 13
Me.[B3].Visible = Me.[age] 12

Else
Me.[B2].Visible = Me.[age] < 13
Me.[B4].Visible = Me.[age] 12
End If

I'm to get it so that if the person is (1st) male and (2nd) under 13 textbox
B1 is shown, and if the're >12 then B3 is shown. The else part is if the're
female with the same age groups.

The problem is that code works for "male", but when "female" is chosen, the
correct "female" box is shown along with both "male" boxes.
What do I need to change?
You need to handle all 4 textboxes in both arguments -

If Me![Gender] = "Male" Then
Me.[B1].Visible = Me.[age] < 13
Me.[B3].Visible = Me.[age] 12
Me.[B2].Visible = False
Me.[B4].Visible = False
Else
Me.[B2].Visible = Me.[age] < 13
Me.[B4].Visible = Me.[age] 12
Me.[B1].Visible = False
Me.[B3].Visible = False
End If
Wayne Gillespie
Gosford NSW Australia
Apr 1 '08 #2
I've also noticed that you may want to set each control's property to
Visible=n in the property sheet to make things appear (or not appear)
consistently.
Apr 2 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Lyn | last post by:
I am trying to embed a picture into a Bound Object Frame (Me!Photograph) with the following code which is based on MS article http://support.microsoft.com/?id=158941: strPathname =...
4
by: Mystery Man | last post by:
I want to deliberately make a label (and perhaps a button) flash to alert the user that something very serious has happened. Any ideas on how to do this?
0
by: AinO | last post by:
Hi, (VS2003/c# - System.Windows.Forms) I have two panels on a parent panel, where one is docked top and the second docked client area. They both have their Visible property = false at design...
7
by: Jacob | last post by:
Has anybody else encountered a problem when running your asp.net applications off your localhost and having broken image links? The weird thing is, the links aren't really broken. The reference...
1
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem...
8
by: Hansen | last post by:
Hi I have a form with multiple labels and textboxes and listboxes that need to be made visible and not visible when buttons are clicked. Is there anyway of grouping them together so that I have...
2
by: scottls | last post by:
Hi All, Thanks for reading my post. I have been working on getting nested datalists working properly wihtin my framework for many days and I think I'm almost there. See if you could help me...
2
by: André | last post by:
Hi, I made a detailsview containing several fields for inserting only. I also made a dropdownlist which is invisible at start. Now, when clicking in a particular textbox, the dropdownlist must...
14
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using VS2005 and .net 2.0. I'm creating an application that has 3 forms. I want allow users to move forward and backward with the forms and retain the data users have entered. I thought...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.