Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

Reformat Results as a Form

I am using the FrontPage Database Results component to display some records with a filter.  Two of the values are Yes/No (the checkboxes in Access) but display in the results as "True" or "False".  Is there a relatively easy way to make them display as checkboxes (in a form) or even buttons (so as they could be updated.)?  
1 Solution
Unless you know how to modify the Web Bot code then no.  You can do it with ASP.  Why don't you just create a duplicate form that pulls the info from the database and puts it in the fields.  Then you can update it that way.

probelawAuthor Commented:
I think the form as results is the best way to go...I didn't even think of that.  One problem though...using the checkboxes for a true/false value...

You can set the checkboxes to have an initial state of checked or unchecked...

<input type="checkbox" name="Ordered_County_RD" %>" checked>

How can I tell them to go with what the database record has (checked for true, unchecked for false)?
I don't remember exactly what will return from Access.  But this is the idea.

1. If after getting the recordset and the value of the field (boolean field in Access) is 1 or 0 (1: true, 0: false).  You use this sub

Sub IsCheckedBox(value)
  If (value = 1) Then
    Response.Write " checked "
  End If
End Sub

2. If after getting the recordset and the value of the field (boolean field in Access) is True or False.  You use this sub

Sub IsCheckedBox(value)
  If (value) Then
    Response.Write " checked "
  End If
End Sub

When you write the <input type= .." use this

<input type="checkbox" name="Ordered_County_RD" <%IsCheckedBox(TheValueFromDataBaseInRecordSet)%> >

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now