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
Clearing form fields
Collapse
X
-
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 :
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.Code:Dim ctl As Control For Each ctl In Me.Controls Select Case ctl.ControlType Case acCheckBox, acComboBox, ... ctl.Value = Null End Select Next ctl -
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)
ThanksComment
-
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.
-AJComment
-
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.Comment
Comment