472,791 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

ASP/Html checkbox convert to true/false for MS Access backend.

I have a microsoft access front end and backend database for multi-
user use. I have the back end located on a server that also is an IIS
webserver. I've created a few ASP pages that pull customer lists down
so far and it works great. I am trying to edit some of that data and
noticed that a checkbox on the webpage uses ON/OFF instead of True/
False like MS Access uses. My problem is trying to get the checkbox to
be checked if the data in the field called "ServiceCallBack" is pulled
and shown to be True. If False then it would uncheck the box.

Here is the code I have on that webpage:

<%

ID = Request("ID")
ID = CLng(ID)

%>
<!--#include file="database-connect.asp"-->
<%
SQL = "SELECT * FROM Support2Q WHERE LeadDetailID=" & ID
RS.Open SQL, Conn

ServiceNotes = rs("ServiceNotes")
ServiceCallBack = rs("ServiceCallBack")
ServiceCallBackTime = rs("ServiceCallBackTime")
Customer = rs("Customer")
ContractorName = rs("ContractorName")
%>
<!--#include file="database-disconnect.asp"-->

<html>
<body>

<form method="POST" action="editprocess.asp">
<tr>
<td width="130">LeadDetailID:</td>
<td width="267"><input type="hidden" name="ID" value="<%=ID%>"
size="25"></td>
<p>
</tr>
<tr>
<td width="130">Customer:</td>
<td width="267">
<input type="text" name="Customer" value="<%=Customer%>"
size="57"></td>
</tr>
<tr>
<td width="130">&nbsp;&nbsp;&nbsp; </p>
<p>
Contractor Name:</td>
<td width="267">
<input type="text" name="ContractorName" value="<%=ContractorName
%>" size="50"></td></p>
<p>
Notes: <textarea rows="8" name="ServiceNotes" cols="86"><
%=ServiceNotes%></textarea></p>

<p>Call Back?
<input type="checkbox" name="ServiceCallBack" value="<
%=ServiceCallBack%>"></p>

<p>Call Back When?</td>
<td width="267"><input type="text" name="ServiceCallBackTime"
value="<%=ServiceCallBackTime%>" size="50"></td></p>

<p><input type="submit" value="Submit" name="B1"></p>
</form>
</body>
</html>
Nov 19 '08 #1
1 5103

<jo*********@gmail.comwrote in message
news:f7**********************************@40g2000p rx.googlegroups.com...
>I have a microsoft access front end and backend database for multi-
user use. I have the back end located on a server that also is an IIS
webserver. I've created a few ASP pages that pull customer lists down
so far and it works great. I am trying to edit some of that data and
noticed that a checkbox on the webpage uses ON/OFF instead of True/
False like MS Access uses. My problem is trying to get the checkbox to
be checked if the data in the field called "ServiceCallBack" is pulled
and shown to be True. If False then it would uncheck the box.

Here is the code I have on that webpage:

<%

ID = Request("ID")
ID = CLng(ID)

%>
<!--#include file="database-connect.asp"-->
<%
SQL = "SELECT * FROM Support2Q WHERE LeadDetailID=" & ID
RS.Open SQL, Conn

ServiceNotes = rs("ServiceNotes")
ServiceCallBack = rs("ServiceCallBack")
ServiceCallBackTime = rs("ServiceCallBackTime")
Customer = rs("Customer")
ContractorName = rs("ContractorName")
%>
<!--#include file="database-disconnect.asp"-->

<html>
<body>

<form method="POST" action="editprocess.asp">
<tr>
<td width="130">LeadDetailID:</td>
<td width="267"><input type="hidden" name="ID" value="<%=ID%>"
size="25"></td>
<p>
</tr>
<tr>
<td width="130">Customer:</td>
<td width="267">
<input type="text" name="Customer" value="<%=Customer%>"
size="57"></td>
</tr>
<tr>
<td width="130">&nbsp;&nbsp;&nbsp; </p>
<p>
Contractor Name:</td>
<td width="267">
<input type="text" name="ContractorName" value="<%=ContractorName
%>" size="50"></td></p>
<p>
Notes: <textarea rows="8" name="ServiceNotes" cols="86"><
%=ServiceNotes%></textarea></p>

<p>Call Back?
<input type="checkbox" name="ServiceCallBack" value="<
%=ServiceCallBack%>"></p>

<p>Call Back When?</td>
<td width="267"><input type="text" name="ServiceCallBackTime"
value="<%=ServiceCallBackTime%>" size="50"></td></p>

<p><input type="submit" value="Submit" name="B1"></p>
</form>
</body>
</html>
<p>Call Back?
<input type="checkbox" name="ServiceCallBack" value="-1" <% If
ServiceCallBack = -1 Then Response.Write " ""checked""" %>>
</ p>

--
Mike Brind
MVP - ASP/ASP.NET
Nov 20 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: thejackofall | last post by:
Hi. This little thing is killing me. I have CheckBoxes in a DataGrid as below. When user pushes a submit button, I want to know what CheckBoxes are checked. However, in the submit button...
3
by: Jack | last post by:
<i><input type="checkbox" name="chk_Complete" value="TRUE" <%Response.Write l_IsChecked%>"<%if cbool(l_IsChecked) then Response.Write " checked" Else Response.Write " unchecked"%>> The above...
2
by: Kufre | last post by:
I need anyone that have done this before to help me. I'm creating a form in Access, in the form has two two checkbox, checkbox A is paid, checkbox B is partial_paid. I want the set the checkbox so...
1
by: Ramakrishnan Nagarajan | last post by:
Hi, I have two checkboxes in each row of a grid. One for Modify and another one for View. If I click Modify the View should get automatically checked and should be disabled. Earlier I did this in...
6
by: hazz | last post by:
ICollection CreateDataSource() { dt.Columns.Add(new DataColumn("ReportInclude", typeof(Boolean))); for (int i=0; i<=10; i++) { dr = dt.NewRow(); dr = 0; dt.Rows.Add(dr); } void...
2
by: justplain.kzn | last post by:
Hi, I have a table with dynamic html that contains drop down select lists and readonly text boxes. Dynamic calculations are done on change of a value in one of the drop down select lists. ...
1
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
1
by: arggg | last post by:
I have an external html that is a form. the Values of the form elements have <?= $results ?> type information however with file_get_contents in the main php file that then stores the contents to a...
2
by: joecosmides | last post by:
I have a microsoft access front end and backend database for multi- user use. I have the back end located on a server that also is an IIS webserver. I've created a few ASP pages that pull customer...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.