PDA

View Full Version : Checkbox next to each record



Yvaine
09-14-2008, 07:24 PM
I have a list of file name stored in a table called FileName, a table called PrintQueue and a form that bound to this table. FileName contains 2 fields, the file name, flag and PrintQueue contains 1 field, Filename. In the design view of this form, i placed a checkbox and bound it to a flag to allow individual selection. When a "Finish" button is click, those file name where its checkbox is checked will have to be added PrintQueue table. Lastly, every time the form is loaded, i will have to uncheck all checkbox. Kindly give me some guidance thanks

CreganTur
09-15-2008, 05:31 AM
FileName contains 2 fields, the file name, flag
Have you considered making the Flag field a Yes/No field (if it isn't already)


When a "Finish" button is click, those file name where its checkbox is checked will have to be added PrintQueue table.
You can accomplish this via an Update Query


Lastly, every time the form is loaded, i will have to uncheck all checkbox.
For the Form's OnLoad event just run an Update Query to change the Flag field to No wherever it is Yes.


Kindly give me some guidance thanks
Please let us know if you need more help.

Yvaine
09-15-2008, 08:01 PM
Update the table field like this?

Update FileName set Flag = 'No' where Flag = 'Yes'

After run this code, those check box will be unchecked?
In fact i have finally turned to use list box which is much easier, but i was just curios to know how to deal with the check boxes.

By the way, any idea how to send a list of documents with filename and path, consisting of different extension to printing queue, after selecting printer attached to PC.

CreganTur
09-16-2008, 07:23 AM
Update the table field like this?

Update FileName set Flag = 'No' where Flag = 'Yes'

Yeah... that looks right. Try it out and see if it works- i understand from your post that you're going a different way, and that's fine, but it can't hurt to learn something new


By the way, any idea how to send a list of documents with filename and path, consisting of different extension to printing queue, after selecting printer attached to PC.
I've never explored using VBA to print outside of Word... sorry. Hopefully some other more knowledgable soul will be able to help you with this.

Yvaine
09-16-2008, 10:43 PM
[quote=CreganTur]Yeah... that looks right. Try it out and see if it works- i understand from your post that you're going a different way, and that's fine, but it can't hurt to learn something new

Wow, i didnt realize that checkbox will be automatically created once we create a "Yes/No" field. what i have previously were all wrong. I create a checkbox in the form itself,but bounded to the yes/no field. Actually it is the same also.

CreganTur
09-17-2008, 05:26 AM
Wow, i didnt realize that checkbox will be automatically created once we create a "Yes/No" field. what i have previously were all wrong. I create a checkbox in the form itself,but bounded to the yes/no field. Actually it is the same also.

Open your table in design view, select your Yes/No field, and click on the Lookup tab on the bottom of the design screen. You'll see an option called "Display Control". You can use this to have your Yes/No field display as a checkbox, a textbox, or a combobox.

Whatever you choose is how the field will look in datasheet view, and will also determine how the field appears when you drag it onto a Form.

You can manually create an unbound control and then bind it to your yes/no field in your table- this is possible, but if you have the field set as a checkbox, and you want a checkbox on your Form, then why reinvent the wheel?