J
Jack
Hi,
Here is my problem:
I am logging in to a page, where the page retrieves a record from a database.
The text boxes are used in the display formto let the users update the
fields,
if they desire to.
The colorpreference and foodpreference fields are text fields
while the FinalUpdate field is a yes/no field in Access Database.
While retieving the values, the FinalUpdate field value is not showing up as
it should. e.g.
if for the record the database has a checked field for FinalUpdate(i.e. yes)
then the
chkFinalUpdate checkbox in the form should be checked. Instead it shows
unchecked. I
believe the code to retrive the value of the final update field is not
correct.
Any help is appreciated here for problem resolution. Regards
RELEVANT CODE:
<%
'Declare variables to store field values
Dim l_ColorPreference
Dim l_FoodPreference
Dim l_FinalUpdate
'Get all the fields from the database in the above variable
l_ColorPreference = RS.Fields("ColorPreference")
l_FoodPreference = RS.Fields("FoodPreference")
l_FinalUpdate = Rs.Fields("FinalUpdate")
%>
<!--In the HTML part display the values with proper formatting__>
<td>Color Preference</td>
<td><input TYPE="text" NAME="txtColorPref" SIZE="15" value =
"<%Response.Write l_ColorPreference%>"></td>
<td>Food Preference</td>
<td><input TYPE="text" NAME="txtFoodPref" SIZE="15"value =
"<%Response.Write l_FoodPreference%>"></td>
</tr>
<tr>
<td>FinalUpdate</td>
<td><input TYPE="checkbox" NAME="chkFinalUpdate" VALUE= "<%Response.Write
CInt(l_FinalUpdate)%>"></td>
</tr>
Here is my problem:
I am logging in to a page, where the page retrieves a record from a database.
The text boxes are used in the display formto let the users update the
fields,
if they desire to.
The colorpreference and foodpreference fields are text fields
while the FinalUpdate field is a yes/no field in Access Database.
While retieving the values, the FinalUpdate field value is not showing up as
it should. e.g.
if for the record the database has a checked field for FinalUpdate(i.e. yes)
then the
chkFinalUpdate checkbox in the form should be checked. Instead it shows
unchecked. I
believe the code to retrive the value of the final update field is not
correct.
Any help is appreciated here for problem resolution. Regards
RELEVANT CODE:
<%
'Declare variables to store field values
Dim l_ColorPreference
Dim l_FoodPreference
Dim l_FinalUpdate
'Get all the fields from the database in the above variable
l_ColorPreference = RS.Fields("ColorPreference")
l_FoodPreference = RS.Fields("FoodPreference")
l_FinalUpdate = Rs.Fields("FinalUpdate")
%>
<!--In the HTML part display the values with proper formatting__>
<td>Color Preference</td>
<td><input TYPE="text" NAME="txtColorPref" SIZE="15" value =
"<%Response.Write l_ColorPreference%>"></td>
<td>Food Preference</td>
<td><input TYPE="text" NAME="txtFoodPref" SIZE="15"value =
"<%Response.Write l_FoodPreference%>"></td>
</tr>
<tr>
<td>FinalUpdate</td>
<td><input TYPE="checkbox" NAME="chkFinalUpdate" VALUE= "<%Response.Write
CInt(l_FinalUpdate)%>"></td>
</tr>