By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 1,076 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

Trouble with Check Boxes in records...

P: n/a
Hi,

I have a form with a sub-form.
The Main form shows a selected product, and the sub-form shows the
package contents for that product as follows:

Item | Qty | Print (Checkbox)

Basically, when the sub-form loads, I want all the Item lines 'Print'
check boxes CHECKED. The user can then UNSELECT certain package items
dependent on the customers requirements.

(A report can then be printed which only lists the CHECKED lines)

Basically, I need to have all the checkboxes CHECKED on FORM LOAD and
all CHECKED back when the form is closed.

How can this be done ?

Appreciate your help.

David
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 6 Apr 2004 08:03:19 -0700, da***@scene-double.co.uk (David) wrote:
Hi,

I have a form with a sub-form.
The Main form shows a selected product, and the sub-form shows the
package contents for that product as follows:

Item | Qty | Print (Checkbox)

Basically, when the sub-form loads, I want all the Item lines 'Print'
check boxes CHECKED. The user can then UNSELECT certain package items
dependent on the customers requirements.

(A report can then be printed which only lists the CHECKED lines)

Basically, I need to have all the checkboxes CHECKED on FORM LOAD and
all CHECKED back when the form is closed.

How can this be done ?

Appreciate your help.

David

Can you not just run an update query on the form's On Open event?
-----------------------------------
Private Sub Form_Open(Cancel As Integer)
Dim strDoPrint As String

strDoPrint = "UPDATE tblPkgContents SET Print = True"
CurrentDb.Execute strDoPrint, DbFailonerror
End Sub
-----------------------------------
And then set them back when the form closes...
-----------------------------------
Private Sub Form_Close()
Dim strDoPrint As String

strDoPrint = "UPDATE tblPkgContents SET Print = False"
CurrentDb.Execute strDoPrint, DbFailonerror
End Sub
-----------------------------------

- Jim
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.