select all

toddbingham

Registered User.
Local time
Today, 11:50
Joined
Jul 8, 2003
Messages
93
Have a query based on database that has check boxes and a date field. I would like to be a ble to check all at once, a select all button if you will. I would also like to fill in the date field the same way. Any suggestions?

Thanks.
 
If you want to select all checkboxes on your form, use code like this:

Private Sub cmdSelectAll_Click()
Dim ctl As Control

For Each ctl In Me.Controls
  If ctl.ControlType = acCheckBox Then
    ctl.Value = True
  End If
Next ctl

End Sub
 
It only seems to work if I have numerous check boxes within the same record. But, if I have a list of records, it does not work. Any suggestions?
 
Are you talking about multiple checkboxes on the same form? Perhaps a continuous form? Or on a query? I guess I assumed a form since this is in the Forms section of the forums.
 
Above code from DCX is designed to work on a record level. If you want to do multiple records you should use SQL.

Regards

The Mailman
 
I would like to use a tabular form. Any suggestions on the SQL?
 
What exactly do you mean by a tabular form? A form that shows one record at a time with tab pages?
 
You can just make a query in the QBE and call it from the on click event of a button

Currentdb.querydefs("YourQuery").execute

That is if you dont want specific filtering...

Regards
 
From a form? I will post a screen shot of what I would like to have.
I will give a run down of what is going on. This is for a finance company that s issuing checks. Each check is assigned a check number. We typically send out 600 per week. Most of these checks will not be cashed and have to be voided on a specified date. I could also lve with entering each check number and a date and voiding them that way as well. Look at the screen shot attached to see how the fields are labled.

Thanks.
 

Attachments

I guess an easier way to explain it is, I need to update multiple records at once. I want a way to do it so that it is GUI and regular user can do it. Hope that helps.
 
namliam said:
You can just make a query in the QBE and call it from the on click event of a button

Currentdb.querydefs("YourQuery").execute

That is if you dont want specific filtering...

Regards
From a form?
Yes from the form (or the buttons On click event really.

What is the basis of that form?

Regards
 
By: What is the basis for that form

I mean:
Table
Query
Filter?

What are the constraints on that form?

What you need is an update query, no question about it.... Just the question of how to build it...

Regards
 
You will get the same help if you have one thread !!!

Double posting IS NOT DONE... so dont!

Regards
 

Users who are viewing this thread

Back
Top Bottom