View Full Version : Updating Specific field in specific record


bri822
06-27-2002, 08:58 AM
OK, I am looked through the message board so far and could not find anything that helped me. What I am looking to do, is to update a check box on a table.

I have a form that gets data for a job. On this form, you can click a button to add a work order. Also on this form is a check box that reflects the value on the job table. What I need, is when I save the work order, that I place a check mark in the check box on my table. This way the user can tell if there already is a work order.

If anyone has any ideas, I would really appreciate it. Thank you for your time!

Brian

RichMorrison
06-27-2002, 09:31 AM
1) Create a Yes/No field in your table.
2) Create a checkbox control on your form.
3) "Bind" the checkbox on the form to the Yes/No field in the table, select the field name of the table as "Control Source" of the control.

RichM

bri822
06-27-2002, 09:53 AM
Sorry I was not as descriptive as I should have been. The check box is more for the program knowing there is a work order. The user should never be allowed to click on it, infact right now it is disabled. I just don't want to have a work order, then have a user click it off or vice cersa. Thank you for your input though!

Brian

Pat Hartman
06-27-2002, 06:29 PM
In the Current event of the form, run a DCount() function to count the workorders for the current job. If the count is > 0, set the unbound checkbox to true else set it to false.

bri822
06-28-2002, 08:47 AM
Thank you very much for that idea. I never though about it. The only thing is that now I have a new problem. The subform with the check box is continous, and could have many copies contained within the form. I have been trying to play around with how to check just one of those subforms without checking them all. Another way to get around that would be to update the table too if that was possible. Any help on this new problem would be appreciated! Thank you

Brian