Checkbox lists without updating table

  • Thread starter Thread starter trawets
  • Start date Start date
T

trawets

Hi

I'm not sure how to explain what I would like to do.

Firstly I have a table with a list of documents, fields are ID,
Number, Title, Required
the Required field is currently a yes/no field

I would like to run a report or form which lists the documents, then I
would like select the forms required by the checkbox and then run a
query to produce and print a report of the selected documents.
But most of all I would like it not to save the check box status and
return to the default (blank) state
can I do this? or could someone point a tutorial that explains this or
similar situations.
 
Once you are finished with your report or form, run an Update Query which
returns the value in the check boxes to no.
 
You cannot just add an unbound check box to a form, and have it remember a
different value for each record.

You could add the yes/no field to your table (say IsPicked), add this check
box to the form, print the report for the selected check boxes, and then
reset it to No for all records. The code for your Unpick All button would
look something like this:
Dim strSql As String
If Me.Dirty Then Me.Dirty = False 'Save any changes
strSql = "UPDATE Table1 SET IsPicked = FALSE WHERE IsPicked = TRUE;"
dbEngine(0)(0).Execute strSql, dbFailOnError

If you want something more, you could create a batch table where you select
the records to be printed in the batch, and keep a history of what was
printed when.
 
You cannot just add an unbound check box to a form, and have it remember a
different value for each record.

You could add the yes/no field to your table (say IsPicked), add this check
box to the form, print the report for the selected check boxes, and then
reset it to No for all records. The code for your Unpick All button would
look something like this:
    Dim strSql As String
    If Me.Dirty Then Me.Dirty = False    'Save any changes
    strSql = "UPDATE Table1 SET IsPicked = FALSE WHERE IsPicked = TRUE;"
    dbEngine(0)(0).Execute strSql, dbFailOnError

If you want something more, you could create a batch table where you select
the records to be printed in the batch, and keep a history of what was
printed when.

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.










- Show quoted text -
Hi thanks for your replies
Allen I think Ive got a handle on what you mean, but there's something
I don't know how to achieve is how to show all my records on the same
form so I can use the check box to select the record I require I don't
want to have to navigate through all the records just scroll down a
list as you would on a table, could you advise where I might look to
find this out.
 
Create a form in Datasheet View, or Continuous View.

To temporarily switch your existing form to Datasheet view, use the View
icon (left of toolbar), or View menu.

To permanently set your form to open in Datasheet view, open it in design
view, and set its Default View property.
 
Create a form in Datasheet View, or Continuous View.

To temporarily switch your existing form to Datasheet view, use the View
icon (left of toolbar), or View menu.

To permanently set your form to open in Datasheet view, open it in design
view, and set its Default View property.

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users -http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.






- Show quoted text -

Allen
I do aplogise for asking such a newbie question as before I should
have spent just a litle time thinking before I asked.
But I am in danger of asking another, I now have my form with the
control button to run my associated queries and reports, a subform
containing my datasheet view of the list and all is working well,
except is there a feature that is query or form specific that allows
you turn off the "action confirmation dialog box" ( ie ammneding
records confrimation), and another which may not access related when
using the print option can we choose another printer rather than the
default printer to say a pdf printer.

Thanks again for your previous answers and guidance.
regards.
Stewart
 
Re the confirmation dialog, see:
Action queries: suppressing dialogs, while knowing results
at:
http://allenbrowne.com/ser-60.html

I'm not sure what the other dialog is. Access doesn't normally fire a dialog
every time you print, so perhaps it is specifically programmed as you say.
The simplest approach is to just OpenReport, and the user can change the
printer before printing if they wish (through the File menu.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Translate Checkboxes to a Table 6
Clear All Checkboxes 1
Update Checkbox 3
Table headers in a list box (Custom Report) 3
Checkbox to activate textbox input 11
Lookup Columns 3
Query design 0
Refresh Table 3

Back
Top