473,545 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

hide check box in form

59 New Member
How can I write code who will hide check box in a form after confirmed.
Feb 11 '08 #1
1 2508
MMcCarthy
14,534 Recognized Expert Moderator MVP
You need to create an after update event on the checkbox control.

If your checkbox name was check1 then ...
Expand|Select|Wrap|Line Numbers
  1. Private Sub check1_AfterUpdate()
  2.  
  3.     If Me!check1 = -1 Then
  4.         ' move focus to the next control on the form
  5.         Me!ctlName.SetFocus
  6.         Me!check1.Visible = False
  7.     Else
  8.         Me!ctlName.SetFocus
  9.         Me!check1.Visible = True
  10.     End If
  11.  
  12. End Sub
  13.  
  14. ' The following code would also need to be placed in the On Current event of the form.
  15. Private Sub Form_OnCurrent()
  16.  
  17.     If Me!check1 = -1 Then
  18.         ' move focus to the next control on the form
  19.         Me!check1.Visible = False
  20.     Else
  21.         Me!check1.Visible = True
  22.     End If
  23.  
  24. End Sub
  25.  
Feb 11 '08 #2

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

Similar topics

2
2486
by: Ajai Kumar .R | last post by:
Hai all, I've two or more forms on my app. My requirement is, Have to show the first form asa the user press a button have to hide the first form and show the second form. If the user press the escape key on second form, this should be hidded and should show the first form.... Can some one guide me how to achive this... (MUST USE SHOW &...
9
2741
by: sergio | last post by:
Hi all, I have created the following script that will show/hide a menu based on checkboxes. It works fine in Opera but not on IE6! Does anybody knows a workaround this problem? Thanks for your response. Sergio ------------------------------------------------ <script language="JavaScript" type="text/javascript">
19
6860
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the JavaScript in this code from a couple different sites but I'm not 100% sure what each line is doing...This is the ASP code that I'm using for the...
3
12612
by: Big Time | last post by:
I have a search form used to query a MySQL database. I want the search results to appear on the same page as the search form, below the search box after the have entered their search criteria. I can do this using the GET method, however this displayrs all the parameters in the URL. I understand you can hide the parameters by using the POST...
4
2435
by: Maarten | last post by:
Hi I'm trying to make something i tought is was simple if i press the cross on the childform to close it, i want it to hide. but when i press a button on the parrent i want to close the child. so on the child i made a formclosing handler an in the handler i put: this.hide();
1
16731
by: asilverpeach | last post by:
Hey Guys! Found some great scripts here on this topic but have to make to changes to the code that I can't seem to figure out. First, In the following code clicking on the headers shows the div information. I want a nested show hide element though. So when you click on "Do you have carpets to be cleaned?" Small Rooms & Medium Rooms...
2
9593
by: mqudsi | last post by:
I'm making a system tray application, and I just can't figure out how to make it hide on execution just like it used to in C++. If I have a button the form and in the button's Click method i have {this.Hide();} The entire form will disappear. But if I put "this.Hide()" in the from's onLoad code, it *doesn't* get hidden. Can anyone...
10
11733
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines. It seems the simplest thing is to run the code (see below) once with the detail section showing, and a second time hiding the detail section. I...
15
3779
by: worked | last post by:
I have a script that hides / shows form elements, and wrapped in a tab script (tab navigation). When the code is duplicated (per tab content), the hide / show function works for the first tab but breaks in each subsequent tab. Why? Help appreciated! Example: http://geocities.com/edmurphy21/ hide / show script: <script...
1
4273
by: ll | last post by:
I'm currently working on a form which consists of a show and hide javascript. The toggle works fine, although when I click on submit, I would like the page to reload with the toggle (show/hide) div in the same state it was before being submitted. E.G. If the div was visible, I'd like for it to be visible upon return. Here's the script I'm...
0
7473
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7406
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7813
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7431
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7761
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3457
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1888
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1020
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.