473,398 Members | 2,088 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,398 software developers and data experts.

Conditional Hide Of Form Control

Using Access '97

Hi there, I have a form in which I am attempting to have a form control be hidden unless the CONTROL 1 = OTHER. This control is tied to a DROP-DOWN list and one of the options to select is OTHER.

I have the following:

Control 1 = SITE_LOC_CODE
Control 2 = SITE_LOC_OTHER

I need to have Control 2 be hidden unless OTHER is selected from CONTROL 1. At which time, I need to have Control 2 appear so someone can type in an entry.

I have attached some code to see what I have done with CONTROL 1 and CONTROL 2.


[CODE = VBA]
Private Sub SITE_LOC_CODE_AfterUpdate()
If Nz(Me.SITE_LOC_CODE) = "" Then
Me.SITE_LOC_OTHER.Visible = False
End If

If Me.SITE_LOC_CODE = "OTHER" Then
Me.SITE_LOC_OTHER.Visible = True
End If

End Sub
[/code]


Thank you VERY MUCH for your assistance.
Oct 2 '07 #1
1 3981
puppydogbuddy
1,923 Expert 1GB
Using Access '97

Hi there, I have a form in which I am attempting to have a form control be hidden unless the CONTROL 1 = OTHER. This control is tied to a DROP-DOWN list and one of the options to select is OTHER.

I have the following:

Control 1 = SITE_LOC_CODE
Control 2 = SITE_LOC_OTHER

I need to have Control 2 be hidden unless OTHER is selected from CONTROL 1. At which time, I need to have Control 2 appear so someone can type in an entry.

I have attached some code to see what I have done with CONTROL 1 and CONTROL 2.


[CODE = VBA]
Private Sub SITE_LOC_CODE_AfterUpdate()
If Nz(Me.SITE_LOC_CODE) = "" Then
Me.SITE_LOC_OTHER.Visible = False
End If

If Me.SITE_LOC_CODE = "OTHER" Then
Me.SITE_LOC_OTHER.Visible = True
End If

End Sub
[/code]


Thank you VERY MUCH for your assistance.
1. Invoke the property sheet for SITE_LOC_OTHER; set the visible property (default) to No
2.
Expand|Select|Wrap|Line Numbers
  1. Private Sub SITE_LOC_CODE_AfterUpdate()
  2. If Nz(Me!SITE_LOC_CODE, "") = "" Then
  3.        Me!SITE_LOC_OTHER.Visible = False
  4. ElseIf Me!SITE_LOC_CODE = "OTHER" Then
  5.        Me!SITE_LOC_OTHER.Visible = True
  6. Else
  7.        Me!SITE_LOC_OTHER.Visible = False
  8. End If
  9.  
  10. End Sub
Oct 2 '07 #2

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

Similar topics

1
by: DU | last post by:
Assuming you have a typical form built in this manner: <form action="..."> <p><input id="idInputText" name="nameInputText" type="text" size="20"></p> <p><input id="idCheckbox"...
5
by: Brian Rypstra | last post by:
Does any one know if there exists a form control that can function much like a rectangle control but is circular (or 6 sided say)? Can I make a custom control called circle that groups 6 instances...
2
by: James | last post by:
Hi I have set up a subform in datasheet mode containing a second subform also in datasheet mode in order to be able to open it as a subdatasheet. In my application I make the first subform...
2
by: Softwaremaker | last post by:
Hi all, I have created a Windows Form control that runs on a web form. This control is a composite control comprising of other textboxes (public scope). This control inherits from the...
3
by: | last post by:
For a given web form, I want to know what the +simplest+ way to add an attribute to all of a particular control type on that page. For example, I might want to add an onClick attribute to all...
0
by: aakash | last post by:
Hello Guys I am upsizing ms access project to give it a ms sql connectivity I am having problem in accessing form control values in ms sql function CREATE FUNCTION "ReportList DateRange"() ...
2
by: billsahiker | last post by:
I have an asp.net page that dynamically generates client-side javascript. What javascript would hide a control? Specifically, I have a composite web server control and when the user clicks a button...
3
by: Simon | last post by:
Dear reader, On the event "Lost focus" I make the ComboBox invisible but the massage pops up "You can't hide a control that has the focus." But this code is written in the "Lost focus"...
2
by: Dan2kx | last post by:
Hello, I have another problem to which i cannot figure out a resolution, I have a listbox on a form, on double click event of a row in the listbox i want to run some code, update tables etc...
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
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
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
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,...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.