473,486 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

tick multiple check boxes on multiple sub-form records

Hi,

I have a form, frmInvoices and a subform, frmInvoicesSub.

On the parent form, i have a "print report" button, that prints a report
depending on an ID on the parent form.

Each record in the subform has a check box, "invoiced".

Currently, my print report button has the folowing code:

Forms![frmInvoices]![frmInvoicesSub].Form![AmIInvoiced] = 1

However, this only ticks the box on the first record.

Does anybody know how I can force all boxes to be ticked?

Thanks
Craig Mason
Nov 12 '05 #1
2 3733
The table your subform is based on should have an equivalent ID to the ID on the
main form. Create a query based on the subform's table and include that ID field
and your "invoiced" field. Set the criteria for the ID field to the expression:
Forms!FrmInvoices!ID. Turn the query into an update query and in the query tell
it to update the "Invoiced" field to True.

Add the following code to the beginning of the code for your print button:
Docmd.Setwarnings False
Docmd.OpenQuery "NameOfNewQuery"
Docmd.Setwarnings True
Me.Requery

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Craig M" <No**@mPlz.Thx> wrote in message
news:40***********************@news-text.dial.pipex.com...
Hi,

I have a form, frmInvoices and a subform, frmInvoicesSub.

On the parent form, i have a "print report" button, that prints a report
depending on an ID on the parent form.

Each record in the subform has a check box, "invoiced".

Currently, my print report button has the folowing code:

Forms![frmInvoices]![frmInvoicesSub].Form![AmIInvoiced] = 1

However, this only ticks the box on the first record.

Does anybody know how I can force all boxes to be ticked?

Thanks
Craig Mason

Nov 12 '05 #2
That worked great,

Thanks!

"PC Datasheet" <sp**@nospam.spam> wrote in message
news:aU******************@newsread3.news.atl.earth link.net...
The table your subform is based on should have an equivalent ID to the ID on the main form. Create a query based on the subform's table and include that ID field and your "invoiced" field. Set the criteria for the ID field to the expression: Forms!FrmInvoices!ID. Turn the query into an update query and in the query tell it to update the "Invoiced" field to True.

Add the following code to the beginning of the code for your print button:
Docmd.Setwarnings False
Docmd.OpenQuery "NameOfNewQuery"
Docmd.Setwarnings True
Me.Requery

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Craig M" <No**@mPlz.Thx> wrote in message
news:40***********************@news-text.dial.pipex.com...
Hi,

I have a form, frmInvoices and a subform, frmInvoicesSub.

On the parent form, i have a "print report" button, that prints a report
depending on an ID on the parent form.

Each record in the subform has a check box, "invoiced".

Currently, my print report button has the folowing code:

Forms![frmInvoices]![frmInvoicesSub].Form![AmIInvoiced] = 1

However, this only ticks the box on the first record.

Does anybody know how I can force all boxes to be ticked?

Thanks
Craig Mason


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2053
by: CSDunn | last post by:
Hello, I have a situation in which I need to address three SQL Server 2000 Stored Procedure parameters in the OnClick event of an Option Group. The Option Group lives on an Access 2000 ADP form. ...
0
1892
by: Marta Pia | last post by:
Hello, I have a ListView control with CheckBox = true. What I'd like to do is tick all the check boxes when the items are selected. I've tried to put this on the ListView_SelectIndexChanged...
10
2169
by: Martin Eyles | last post by:
Hi, I want to make a scale on a graph, by telling asp to insert empty divs of class tick, and the setting the style in css. I am trying to get a 3D effect by using colored top and bottom borders...
7
5445
by: Demonicpagan | last post by:
I have this form where I am trying to place items from checked boxes into a text box. An image of what this form looks like is at http://www.stelth2000inc.com/images/screen.png Here is some...
5
1587
by: John | last post by:
Hi I have a bound gridview. I need to allow users to select multiple rows and then press the process button to process multiple selected rows. For this I want to use additional column of...
8
6832
by: KnighT | last post by:
I have a .net service that runs a System.Threading.Timer. The delegate points to the function that the service should execute when the timer elapses. Problem: The timer is not ticking. I have...
3
2679
by: LuCnt | last post by:
I am using Visual basic 6 and i want to be able to select more that one response in a option group with check boxes. As it is now i can only select one response at a time. the code looks like this....
4
4009
neo008
by: neo008 | last post by:
Hi all, Finally gave up and putting it here. I am new to visual basic stucked up with an error- Run time errors.'-2147217887 (8004021)': Multiple-step operation generated errors. check each...
1
2104
by: Inaccessable | last post by:
This is probably very simple but still beyond me. I have a table that stores text in a number of different languages. Each entry has a unique ID number. Each language version of the same text...
7
5531
by: Humakt | last post by:
This is 2D game where there are breakable boxes in the middle two bats on both sides and one or more balls breaking the boxes. Kind of like a mixup of pong and breakout. Collision detection...
0
6964
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
7173
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...
1
6839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4863
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
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
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
259
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.