Can anyone offer any advice on the following please? I have a form which I populate with data, I have a button the form which when clicked opens another form where I can input other details relating to first form. When I close form 2 and add a new record then click the button to complete form 2 the old details are still there. How can I clear this. There are two fields on form 2 that store details from form 1. Thanks
6 1703 NeoPa 32,556
Expert Mod 16PB
I tried to read this but it wraps around itself too much. My brain hurt.
However, to clear all controls from a form some code similar to this should work : - Dim ctl As Control
-
-
For Each ctl In Me.Controls
-
Select Case ctl.ControlType
-
Case acCheckBox, acComboBox, ...
-
ctl.Value = Null
-
End Select
-
Next ctl
You need to check the list of values available in AcControlType to determine which control types you want to recognise as those needing to be reset.
Thanks. I tried this but no joy. I have a command button which I need to save, then clear the fields and return back to first form to enter a new customer
NeoPa 32,556
Expert Mod 16PB
In what way no joy?
Are you the strong-silent type? 'cause I could do with some details to work with here.
What have you tried? What happened when you did?
Okay here goes..I fill in a form with customer details (name, address, etc) and then click a button to complete another form with details of complaints. This form contains a number of fields which are bound and two of them bring details from the initial form such as name and ID.
After htis form is completed I click a button to return to the customer log and enter details of a new customer and repeat the process to add complaint details. However, when this form opens it still has the previous details in. It is this form I want to clear on exiting (having saved the details of course)
Thanks
fillmav - You still did not answer NeoPa's question. You did not indicate what happened when you used the code NeoPa provided. Please give us that information.
FYI - Not giving all the information that is requested is the quickest way for someone to stop helping you, as they will feel you are not following there instruction. This forum is about asking the right questions and getting a complete answer to all questions, without this it is very difficult to help.
Also, you have not told us what you have tried, if anything (i.e. Maybe some code you tried?). Access is about coding 90% - in my world at least =) - of the time, so without knowing what coding you have done, we can't help much.
-AJ
NeoPa 32,556
Expert Mod 16PB
FillMav,
This is of some help. In as much as it's what you should have put together before posting your question in the first place.
As AJ has pointed out though, you have not responded to my questions at all. If you want us to respond to you, then it clearly is a good idea to respond to us when requested.
We can still help with this. We have not given up on you yet, but you need to get a bit more involved if you want us to do the same.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jacek |
last post by:
Hi.
I have some problem. Im not sure if this is problem with asp or maybe
with iis.
I have a form like this - file (file1.asp)
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>...
|
by: hortoristic |
last post by:
We are using JavaScript to Enable/Disable certain fields on web pages
based on business rules.
A simple example is if when using an option type tag, and the two
options are Yes and No. If YES...
|
by: Tyros |
last post by:
I'm new to C# and I'm dynamically creating a table control that contains a
text control inside one of the cells. I load the values of each text field
with an SQL call. The form is simple and I'm...
|
by: tmax |
last post by:
PHP Pros:
I have a simple html form that submits data to a php script, which
processes it, and then redisplays the same page, but with a "thank you"
message in place of the html form. This is...
|
by: scprosportsman |
last post by:
Please help guys, i am trying to set up a database here at work and im
fairly new to access in terms of writing functions and queries and
stuff. I have 2 different places on my design that will...
|
by: Leonardo |
last post by:
As many of you may already know, Firefox's form saving functionality
can be very buggy in that when you set it to NOT save any form values,
it does anyway. This isn't a major issue, but a new web...
|
by: Beany |
last post by:
Hi,
i have an address part in my form, i select a site name from a combobox and it automatically populates my address fields.....
i have a clear button that has a problem clearing these fields...
|
by: nurseman21 |
last post by:
I am creating a form in Access 2007 which is in tab form format. The form has multiple tabs, each tab pertaining to a different part of the same record. I am attempting to make a tab page to include...
|
by: clumsy_ninja |
last post by:
I'm trying to create a tableless layout for a form. The following
markup works as intended in Firefox and Opera, but one of IE 7's bugs
ends up misplacing the floated input fields side-by-side even...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
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...
|
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,...
| |