473,472 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Refreshing a form

21 New Member
hi, myself vandana.
I m making a form for new joining of employees. it has almost 30 text boxes.
after clicking add button all feilds should be clear for new entry.
i m using 30 statements in form_load event as below
text1=""
text2=""
-
-
-
text30=""
i wanna know is their any other way to refresh our form.
Mar 21 '07 #1
5 1483
ansumansahu
149 New Member
hi, myself vandana.
I m making a form for new joining of employees. it has almost 30 text boxes.
after clicking add button all feilds should be clear for new entry.
i m using 30 statements in form_load event as below
text1=""
text2=""
-
-
-
text30=""
i wanna know is their any other way to refresh our form.

You can write a single function that will have the list of all the textboxes and the .Text property of each control should be set to "".

thanks
ansuman sahu
Mar 21 '07 #2
vijaydiwakar
579 Contributor
hi, myself vandana.
I m making a form for new joining of employees. it has almost 30 text boxes.
after clicking add button all feilds should be clear for new entry.
i m using 30 statements in form_load event as below
text1=""
text2=""
-
-
-
text30=""
i wanna know is their any other way to refresh our form.
Yes
Expand|Select|Wrap|Line Numbers
  1.  
  2. private sub ClearAllTextBoxes()
  3. dim Ctrl as control
  4. for each ctrl in me
  5. if typeof ctrl is textbox then ctrl.text=""
  6. next
  7. end sub
  8.  
good luck
Mar 21 '07 #3
samycbe
83 New Member
if u want a employee master screen i can send that form to you......


samy
Mar 21 '07 #4
markmcgookin
648 Recognized Expert Contributor
Yes
Expand|Select|Wrap|Line Numbers
  1.  
  2. private sub ClearAllTextBoxes()
  3. dim Ctrl as control
  4. for each ctrl in me
  5. if typeof ctrl is textbox then ctrl.text=""
  6. next
  7. end sub
  8.  
good luck
Hehe, excellent I never knew about that control class... cheers that's really useful.
Mar 21 '07 #5
vandanasridhar
21 New Member
Yes
Expand|Select|Wrap|Line Numbers
  1.  
  2. private sub ClearAllTextBoxes()
  3. dim Ctrl as control
  4. for each ctrl in me
  5. if typeof ctrl is textbox then ctrl.text=""
  6. next
  7. end sub
  8.  
good luck
thanks. my problem is solved. i must say ur good luck worked well.
thx again.
Mar 23 '07 #6

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

Similar topics

10
by: Philo Del Middleston | last post by:
I've been searching, but apparently not phrasing my search right, so I'm going to float a question out here in the meantime... I'm wondering how to go about refreshing the content of a control...
1
by: LRD | last post by:
Form not refreshing after autopostback unless keyboard or mouse move Hi, We created several new ASP.NET C# forms for our intranet. In each form we use panels for different sections of the...
0
by: Mark Payne | last post by:
Gudday, I have an Access 2000 database which I am using as a phone directory of residents in the hostel where I work. The front end for this directory is a form with a text box (the search name...
1
by: Robert Clark | last post by:
This a pocket pc/smartphone questions mainly, but i thought i'd ask the question in the C# newsgroup. I have a form which i use to display information from a web service. From this form i open...
3
by: Steve Hoyer | last post by:
Good day. I wrote an application to convert data from one database to another. It runs through about 100,000 records for this conversion. That bit works fine. I have on the form a progress...
6
by: Chris Moore | last post by:
I have a .NET form where I am updating a progress bar & counter. As long as the form never loses focus, everything on the form refreshs fine. But If I open another window (like Windows Explorer)...
2
by: dmartin_1 | last post by:
I'm building an application with Visual Basic 2005. The application is multi threaded. It has a record counter on the form that counts up to completion. It works fine throughout the process as...
0
by: sean.hpr | last post by:
Hi all- I am a vb2005 newb so apologies in advance. Essentially I am having some problems with data refreshing on some of my forms. Background: I have created a project containing a few...
13
by: honey99 | last post by:
Hi! I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window...
6
by: shankari07 | last post by:
hi guys, I have a form in html which has the city drop down. when clicking the drop down a javascript is called and a file(test.txt) is created and the city is written into the file. Through php...
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
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.