473,383 Members | 1,846 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,383 software developers and data experts.

How to UnCheck Checkbox in Subform

102 64KB
Hello Friends

I have to create a Transmittal to send some drawings to our Subcontractor. Now what I do.... when I press AddNew Button, it work like this....

Main form open with fields.....

User.... = by selecting from combo box
Today's Date = Automatically toddays
Receiving Department = By selecting Combo Box
Job Completion Date = Automatically Date + 30 days

Now I have a subform and I select Drawings by Checkbox.... Then Save this record and Print... This every thing is OK...

Now I want to create an other record.... and I press Addnew button.... previously selected records still selected...

I want when I press AddNew button.... the selected records in Subform should be Uncheck / Clear...

Kindly help me how to do this.... Checkbox name is "ForPrint"
Thanks
irsmalik
Nov 16 '19 #1
1 1960
NeoPa
32,556 Expert Mod 16PB
Let's start with a direct answer for you. Referring to Items on a Sub-Form shows how you can reference a Control on your Sub-Form from the code associated with the main Form :
Expand|Select|Wrap|Line Numbers
  1. Me!YourSubform.ForPrint = False
That's just one potential form of the code.

Now, I think it makes sense for me to advise against whatever it is you're doing. I have to guess somewhat as you haven't said what the name of your Sub-Form is, or given any clues as to its design, but whatever design you have is almost certainly not a good one.

As you mention that the CheckBox needs to be cleared with code I assume the CheckBox is not bound (IE. Not associated with a Field from the underlying RecordSource). If the Sub-Form contains records that there may be more than one of then you would probably be using it in Continuous Form view. To do so with an unbound Control makes no sense (See Why Values in Unbound Form Controls do not Persist). If there can only be one record, or even if the Sub-Form is linked to the same data as your main Form, then putting the CheckBox on the Sub-Form instead of the main Form makes no sense. It's just an unnecessary complication.

In short, and looking at all the scenarios I can think of, I can see none which would make what you're asking about make any sense. I've told you how you can do it if you feel you must, but the more important message is to reconsider your design. Bad design makes for many headaches.
Nov 16 '19 #2

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

Similar topics

2
by: Kufre | last post by:
I need anyone that have done this before to help me. I'm creating a form in Access, in the form has two two checkbox, checkbox A is paid, checkbox B is partial_paid. I want the set the checkbox so...
3
by: Woo Mun Foong | last post by:
I have a checkbox, when enable, allows me to proceed with what I like to do. However, I need to check a certain conditions before I allow the checked box to be checked, if condition is not fullfill...
5
by: Ron | last post by:
Hi All, I've got a form called frmCust that has a subform on it called sfrmBalance. sfrmBalance's control source is a query called qryTrans4CustBal. sfrmBalance has one field on it called...
4
by: crystal | last post by:
I've checked the threads but haven't been able to come up with a solution to my issue. Help...... I have a simple form based on a table. Within the form is a subform that is also, through a Q,...
2
by: =?Utf-8?B?UmljaA==?= | last post by:
Is there a cancel argument for cancelling if you want to check or uncheck a checkbox? In the checkChanged event of a checkbox I ask the user if they are sure they want to check/uncheck...
12
by: swebster | last post by:
I need to zero in on a specific section of my jsp form during a hide to uncheck the checkboxes in that section. Currently, anything I try either unchecks all checkboxes on the form or doesn't work...
2
by: Hulm1 | last post by:
I have made amazing progress using google and pinching code!. This one has me stuck though. I have a main form "Enquiry_Edit". In the main form are several subforms which become visible based on...
13
by: PhpCool | last post by:
Hi, since sometime I'm stuck in a problem where I want to check or uncheck all the checkboxes. If I'm choosing name for the checkbox array as 'chkbx_ary' then I'm able to check/uncheck all the...
0
by: Chocolade | last post by:
I created a new form and added split container and then on the left side a treeview and on the treeview i added nodes and on the right side of the split container i added a groupbox. Now in the...
5
AccessIdiot
by: AccessIdiot | last post by:
Hello all, I have a form with a subform in datasheet view. The subform shows name and phone number and a checkbox that says "use this contact". When selected, the name and number populate text...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
0
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...
0
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
0
BarryA
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...
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...

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.