473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to clear form without setting DataEntry property to yes

547 512MB
I would like to clear the data displayed in a subform with VBA using a button, similar to when you have the DataEntry property set to NO, and then has to close and open a specific form, to clear it.

In short, the data will be displayed in form until you clear it with a button - (dataentry will be yes, till you press the clear button)

My reason for doing this - when i temporarily close the main form and return later, all data captured are deleted from the subform, and i then have to check what was the last data captured, before continuing with the next lot. This wastes time.

the main form is "StocktakeF"
the subform is called : "Fis_stocktakeSF"

Any suggestions?
Apr 1 '12 #1

✓ answered by ADezii

@neelsfer
Try:
Expand|Select|Wrap|Line Numbers
  1. On Error Resume Next
  2. Dim ctl As Control
  3.  
  4. For Each ctl In Me.Controls
  5.   ctl.Value = Null
  6. Next

3 1832
ADezii
8,834 Expert 8TB
@neelsfer
Try:
Expand|Select|Wrap|Line Numbers
  1. On Error Resume Next
  2. Dim ctl As Control
  3.  
  4. For Each ctl In Me.Controls
  5.   ctl.Value = Null
  6. Next
Apr 1 '12 #2
neelsfer
547 512MB
It's not clearing the subform data = Fis_stocktakeSF when DataEntry property set to NO. Anything else you can suggest?
Apr 1 '12 #3
ADezii
8,834 Expert 8TB
Modify the code for the code for the Sub-Form Controls.
Apr 2 '12 #4

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

Similar topics

14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
1
by: Rocky A | last post by:
I don't remember ever reading about this in any of the "how to" books I've got or I wouldn't bother you guys (honest, I'm not being lazy here.....OK maybe just a little, but you guys are SOOOO...
3
by: JavaConvert | last post by:
I would like to create form that simply hold textboxes that I log info to during the execution of a single-thread application. In Java, I found JFrame ideal for the task, but I can't recreate the...
2
by: Philipp Sumi | last post by:
Hello I have to start an Asp.net project that involves i18n, so I was doing some reading on the subject. I'm not sure (and I *really* hope I'm wrong) but is it true, that there is no way to...
2
by: AA | last post by:
Do anyone know how to refresh the datagrid without setting datasource to nothing and initialize the grid again? My case is that I have form consisting from two part. The upper part is a datagrid...
7
by: David A. Osborn | last post by:
Is there an easy way to dynamically delete all the controls on a form without knowing exactly what the controls are?
13
by: inpuarg | last post by:
Is it possible to get all controls and all of their children on a Windows form without using recursive methods ?
17
The1corrupted
by: The1corrupted | last post by:
I need a simple clear form tag in javascript that would go into an "onLoad" but the one being loaded is on a different frame than the form being submitted... The frame being loaded is called...
5
by: plumba | last post by:
Ok, another query.... I have a checkbox at the bottom of my form which when checked unhides a <div> block which displays the submit button. The problem I have is when the clear form button is...
1
by: joshapalooza | last post by:
I am using a form to sort a report, but I can't seem to get the "clear form" button to work. I used the wizard when I installed the button, using the clear form option under the form option list....
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.