473,496 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Formats: Clearing all text-, check and comboboxes except for one box

3 New Member
Hi Expert,

I want to clear all fields in a format when I push my clear button except for the textbox ' Date ' which contains the current date as a default value.

I'm using the following code:
Dim ctl As Control

For Each ctl In Me.Section(acDetail).Controls
Select Case ctl.ControlType
Case acTextBox, acComboBox
ctl.Value = Null
Case acCheckBox
ctl.Value = True
End Select
Next
Me.Filter = "(false)"
Me.FilterOn = True

This cleans all fields.

Can you help me out?
Thank you,
Tom
Apr 25 '08 #1
2 1273
missinglinq
3,532 Recognized Expert Specialist
I want to clear all fields in a format when I push my clear button except for the textbox ' Date ' which contains the current date as a default value.
This is somewhat confusing. I assume when you say "all fields in a format" you actually mean all fields in a form.We need a little more information in order to help you. Is your form bound or unbound? And why are you clearing the form? In order to enter a new record, perhaps?

Welcome to bytes!

Linq ;0)>
Apr 25 '08 #2
lollebolle
3 New Member
This is somewhat confusing. I assume when you say "all fields in a format" you actually mean all fields in a form.We need a little more information in order to help you. Is your form bound or unbound? And why are you clearing the form? In order to enter a new record, perhaps?

Welcome to bytes!

Linq ;0)>
Hello linq,

indeed, my excuses for the confusion, I mean form. It is indeed for clearing fields to enter a new record.
My form is unbound and I'm using the VB funciton "Date()" as default value but after clearing this field is also blank.

Does this help you?

Thanks,
Tom
Apr 28 '08 #3

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

Similar topics

1
1492
by: Flare | last post by:
Is it true that binary and varbinary has a max-kapacity at 8000 bytes? Im jyst unsure how to read the dokumentation and want to be completely sure. And image is only one to use for data aobve that...
2
1326
by: Mark Jerde | last post by:
(If these are the wrong groups please suggest the right one(s). Thanks.) I need to come up with a way to test potentially thousands of data (files / records / streams) to determine if they match...
0
1138
by: Nikki | last post by:
Hi, I m developing a windows c#.NET application in which text scrolls from right to left (STOCK TICKER). While scrolling the text keeps changing. (TICKER VALUES KEEP UPDATING) Now the problem that...
3
1421
by: Leo Muller | last post by:
Hi, Very often I have a problem with date formats. There are cases I have to cast the date to text and from text to date on a different server. However, sometimes the date formats on the servers...
4
395
by: fred | last post by:
I am trying to put a FileDrop format and a Text format dataobject onto the clipboard so that they are both available. I seem to be able to do one or the other but when I try to put both on only...
4
3157
by: ljlevend2 | last post by:
The help for the Windows.Forms.Clipboard class states, "Place data on the clipboard in multiple formats to maximize the possibility that a target application, whose format requirements you might...
1
1645
by: coldbuttmoneky | last post by:
Now i know that clearing a text field in normal macromedia flash is a simple: textfield.text=""; but when this is place into a button on selteco flash, it doesnt seem to clear anything. The name...
1
997
by: hathan | last post by:
I am using the code below to connect to a Access database and the first time roumd it works perfectly but then it errors. I think that the datatable might need clearing but i dont no how to do this....
7
2539
by: olseni | last post by:
Hi all I hope someone can help me with this. I am sure there is a solution, but I cannot seem to find it.... I need to make a report with the following format: In the columns I have 5 samples,...
4
1497
by: gobblegob | last post by:
I am trying to clear the array STR but it does not clear it. This sub is in a module. Dim STR As Array 'Dim str(6) As String STR =...
0
7120
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
6991
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
7160
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
7196
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
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
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
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
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 ...
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.