473,772 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

retrieve record from access into radio button in form (classic asp)

145 New Member
I have Customer table where there is a field called Company Type which store corporate or private. I want to retrieve the value in the table so it is diplayed on classic asp file in radio button. Im using Access.

im trying this in the asp file
Expand|Select|Wrap|Line Numbers
  1. <input type="radio" name="compType" value="<%=rs("compType")%>">Corporate<p>
  2. <input type="radio" name="compType" value="<%=rs("compType")%>">Private
  3.  
is this the correct way?Another is, is it the same for retrieve the value from table field into form list box and how access can retrieve value from the list box and saving it to the database?
Oct 6 '09 #1
2 3889
jhardman
3,406 Recognized Expert Specialist
Off the top of my head, I believe the code should be:
Expand|Select|Wrap|Line Numbers
  1. <input type="radio" name="compType" value="Corporate"
  2. <%if rs("compType") = "Corporate" then response.write "checked"%> >Corporate</input>
  3. <input type="radio" name="compType" value="Private" 
  4. <%if rs("compType") = "Private" then response.write "checked" %> >Private</input>
  5.  
Jared
Oct 7 '09 #2
puT3
145 New Member
Thank you for this code
Oct 8 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6320
by: Brian | last post by:
Hello all... I have a page that will be performing a search. The search consists of 3 radio button options. The first 2 will search the entire web through google and the site as indexed by google. The 3rd option I want to search the site using MS-Index Server. I can get them to run individually but I'm not sure how to set the parameters and test for the 3rd radio button (index server) selected on the page. I thought that, for...
2
5461
by: steve | last post by:
Hi all What I'm trying to achieve is: I have a form with two radio buttons, if a visitors check radio button 2 and click submit in the next page radio button 2 to be check by default If I use this code <% If Request.Item("col")="firstcoll" Then Response.Write "Checked"%>
3
8758
by: steve | last post by:
Sorry if I have post this two times. Hi all What I'm trying to achieve is: I have a form with two radio buttons, if a visitors check radio button 2 and click submit in the next page radio button 2 to be check by default If I use this code
1
4326
by: Jim Quast | last post by:
I have an ASP page and a CREGReports002.vbs file coded to export data to excel. I do this by building variables in a stored procedure. The ASP page has text boxes, list boxes, and radio buttons. I also placed two buttons on the form. One submits the form to redirect to the Crystal Web Viewer (genCREGReports.ASP). The other one executes VB code in a vbs document that spawns some more code to run a stored procedure with the values from...
4
3250
by: Jay | last post by:
I have a form used to submit data (no surprises there!). I'd like to be able to populate the same form with previously submitted data. The data lives in a database once submitted and using ASP I can populate text boxes/textareas using this data no problem. What about radio buttons? If I have 2 of them named the same rb1 and rb1 with values of yes/no respectively.
1
1640
by: radha | last post by:
hi friend Could somebody please tell me how to update an access record having two primary keys?(vb.net, asp.net, access Also how do we show a page from another page,for eg i am in page1.aspx and i have a button inside and if i click on that button it should open a new page,page2.aspx for me. i do some processing (eg write to a dbase) there and i click on ok.Upon clicking page2.aspx should carry out the required processing and return to the...
1
6891
by: kenny8787 | last post by:
Hi, can anyone help here? I have the following code generated from a database, I want to have javascript calculate the costs of the selected items using radio buttons, subtotal the costs and grandtotal the costs ready for the selected items to be inserted back to the database. I did something like this before with Checkboxes, but Radio button have to be named the same to maintain their groupings.
13
3436
by: kev | last post by:
Hi all, I have created a database for equipments. I have a form to register the equipment meaning filling in all the particulars (ID, serial, type, location etc). I have two buttons at the end of the form which is submit and cancel. After i have clicked submit, the information is stored directly into my corresponding database table. My problem here is i need to retrieve back the information submitted to display all the data that the...
1
2912
lwwhite
by: lwwhite | last post by:
Another question. On one of my forms, I have two radio buttons: Topic and Window. Beside each of them is a drop-down to select the corresponding topic or window. When Topic is selected the window drop-down is disabled, and vice-versa. But what I'd like to do is give the appearance of one field only. So I placed the topic drop-down directly on top of the window drop-down and set their Visible properties using the On Mouse Down event of the...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7461
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.