View Full Version : Check Boxs on Update Page
kdgjevre
05-30-2002, 04:13 PM
Can you use a check box on an update page. The value is either on/off. How do you establish the initial value they entered on the original page on the "update" page.
To see what I am up to now.....
Go to
http://www.sd41.k12.id.us/technology%20services/TechnologySurvey/index.htm
Question, Are you using the DRW to populate the form???
If not. you might try to change the check box.
from
<p style="margin-top: 0; margin-bottom: 0">
<input TYPE="TEXT" NAME="Grade" SIZE="3" VALUE="ON">Electronic Grade book</p>
too
<p style="margin-top: 0; margin-bottom: 0">
<input TYPE="TEXT" NAME="Grade" SIZE="3" VALUE="checked" <%=FP_FieldVal(fp_rs, "fieldname")%>>Electronic Grade book</p>
Notice. I changed the value to "checked" this would need to be reflected in the DB.
Now on the other hand if the DB field is a booleen value (Yes/No) you would change the example above to somthing like this.
<p style="margin-top: 0; margin-bottom: 0">
<input TYPE="TEXT" NAME="Grade" SIZE="3" VALUE="ON"
<% If FP_FieldVal(fp_rs, "fieldname") Then %> checked <% End If %>>Electronic Grade book</p>
kdgjevre
06-03-2002, 12:29 PM
Yes I am populating the "update" page using DBR. So the initial value of the check box is:
<%=FP_FieldHTML(fp_rs,"Virus")%>
The value in the DB from the initial input. So my check box on the update page is showing on/off, or true/false. How do I make it blank or "checked"??
thanks
Setting a check box to a checked state.
Looks like this...
<input TYPE="TEXT" NAME="Grade" SIZE="3" VALUE="ON" checked>Electronic Grade book</p>
So you can get the ON OFF value from the DB, check to see if it's ON then insert the word checked if it is.
<input TYPE="TEXT" NAME="Grade" SIZE="3" VALUE="ON"
<% If FP_FieldVal(fp_rs, "fieldname") = "ON" Then %> checked <% End If %>>Electronic Grade book</p>
Before making changes to the html. Perform a Spooky Diet (http://www.outfront.net/spooky/adv_drw_diet.htm) on the page...
That should get things rolling.
eschulze
06-12-2002, 05:50 AM
I'd like to take this a step further. I am using the database results wizard to make and updates page. It is important the the Yes/No values show up in either the radio buttons or the checkbox fields as they were initially entered. Right now I have nothing. I looked at what was done prior in the post, but that was using a text box with an x in it. At least I think it was according to the page that is there.
Here is a copy of the page ... yes, it is a long form. I'm a newbie so I will work on it.
http://www.nvrsdb.com/colleges/users/updt.asp?cllg=Alabama+at+Birmingham
Also, at the present time I am receiving the following error when I go to update the page:
Database Results Error
Description: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
Number: -2147217913 (0x80040E07)
Source: Microsoft OLE DB Provider for ODBC Drivers
One or more form fields were empty. You should provide default values for all form fields that are used in the query.
Any ideas on either of these?
Eric Schulze
NetLynx Design, Inc.
Welcome to the forum....
This is one thing that I do not like about the DRW...
There is a place, don't remember where, but it gives you the opertunity to set a default value...
You can try these MS links for a detailed description of the problem...
Error Message: "Database Results Error" When You Update a Database Record (Q256136) (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q256136)
Error Message When You Query the Database (Q265320) (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q265320)
Data Type Mismatch Error Message When You Update Record to Database (Q265166) (http://support.microsoft.com/default.aspx?scid=kb;en-us;Q265166)
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.