Link to home
Start Free TrialLog in
Avatar of pmathis
pmathis

asked on

update Check box

I have an asp page that shows the results of a table query for orders.  One of the fields 'completed'  is a YES/NO checkbox or could be a text box.  I would like to be able to show it in the results as a checkbox  either checked or unchecked depending on what the value is from the table, and then from the asp results page be able to go through my list of orders and select which ones are completed and submit them all at once to change the completed status.  Please include sample code.

Thanks
Avatar of rcmb
rcmb

Okay, I understand what you need and I have some sample code for you to test out.

First thing I need to know is do you desire this to happen on one page or can you display the results and then submit the form to another page?

Second, how are you getting to the page displaying then information? and does your query displaying the results limit the records returned, for example are you displaying information for just this month?

RCMB
ASKER CERTIFIED SOLUTION
Avatar of rcmb
rcmb

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pmathis

ASKER

Just got in, Looks great let me take a look at the demo files
Avatar of pmathis

ASKER

is there a way to make it so that if you uncheck it it will change the value back?
Avatar of pmathis

ASKER

Could we have 2 check boxes that would each control a different field?
We could certainly have two boxes - a complete or not complete box. Changing the value back is somewhat difficult because you would not be able to pass a value on a box that is not checked.

I think the best in this case would be to use radio buttons. The buttons would be with comp or not comp. You could then have this pass the value of the radio button to the database and it would always update all of the records displayed because you are always returning a specific state.

I love the way EE works -- you answer a question and there is always three more to follow :-). I learned most of what I know by asking questions in EE. Let me know what you think about the radio buttons and I will see if I can put something together.


RCMB
Avatar of pmathis

ASKER

If you could that would be great, if its too much trouble then I will give you the points.  I got it working with two check boxes and really
appreciated the code.

Thanks

Okay go back to the site and check out the radio button options. You will see that where you select yes it changes the values to 100 and if you select No it changes the values to 200. This will work for you to set the information to complete or not complete.

Pay attention to the If statement inside the form that sets the values of the checked radio button.

RCMB
Avatar of pmathis

ASKER

I'm using the checkboxes, I'll see if the radio buttons will work.
Thanks