Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Re: radio buttons


Message #1 by "Sean Dillon" <sdillon@b...> on Thu, 13 Jun 2002 11:54:30 +0100
I have an update page in which there is 3radio buttons on the page.
When the page is uploaded it reads the values from a database and one and
only one will radio button will appeared checked.
What i want to know is how can i update the database when i have checked a
different radio button.
Can anyone please help me

Message #2 by s.bussing@i... on Thu, 13 Jun 2002 12:33:13
Hi, this shouldn't be too hard. In your page the radiobuttons have the 
same name. The difference is the value:

i.e.

<input type='radio' name='radiobutton' value='1'>
<input type='radio' name='radiobutton' value='2'>
<input type='radio' name='radiobutton' value='3'>

When submitting the page, you request for the radiobutton.
Is option 1 is changed to 2 the requestobject will return 2
(Request("RadioButton")). This value you can store in your DB.

But what you have to do is use one field. So don't use 3 field in this 
example. Define a table like TBL_TableName  and field FLD_FieldName.
In the FLD_FieldName you store the value of the radiobutton. In this case 
the value used to be 1 and is changed to 2. Does this help you. I think 
you defined a field for each radio-option. That I wouldn't do.

Greetzzz
Stephan



> I have an update page in which there is 3radio buttons on the page.
When the page is uploaded it reads the values from a database and one and
only one will radio button will appeared checked.
What i want to know is how can i update the database when i have checked a
different radio button.
Can anyone please help me

Message #3 by "Sean Dillon" <sdillon@b...> on Thu, 13 Jun 2002 14:29:58 +0100
But how do read values back from the database to the form if the
radiobuttons are all called the same name. I might just try using some if
statements instead


-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 13 June 2002 12:33
To: Access ASP
Subject: [access_asp] Re: radio buttons


Hi, this shouldn't be too hard. In your page the radiobuttons have the
same name. The difference is the value:

i.e.

<input type='radio' name='radiobutton' value='1'>
<input type='radio' name='radiobutton' value='2'>
<input type='radio' name='radiobutton' value='3'>

When submitting the page, you request for the radiobutton.
Is option 1 is changed to 2 the requestobject will return 2
(Request("RadioButton")). This value you can store in your DB.

But what you have to do is use one field. So don't use 3 field in this
example. Define a table like TBL_TableName  and field FLD_FieldName.
In the FLD_FieldName you store the value of the radiobutton. In this case
the value used to be 1 and is changed to 2. Does this help you. I think
you defined a field for each radio-option. That I wouldn't do.

Greetzzz
Stephan



> I have an update page in which there is 3radio buttons on the page.
When the page is uploaded it reads the values from a database and one and
only one will radio button will appeared checked.
What i want to know is how can i update the database when i have checked a
different radio button.
Can anyone please help me


Message #4 by s.bussing@i... on Thu, 13 Jun 2002 14:53:40
Ok, so that was the problem. Well you could do something like this:

Dim btnRadioButton : btnRadioButton=1 'Default value is 1

btnRadioButton = rs("radiobuttonfield")

<input type='radio' name='radiobutton' value='1' <% If bntRadioButton=1 
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='2' <% If bntRadioButton=2 
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='3' <% If bntRadioButton=3 
then response.write "CHECKED"%>>

As you can read. Default the var is filled with 1. So if no results are 
returned the first option is checked. 

Hope this helps.





> But how do read values back from the database to the form if the
radiobuttons are all called the same name. I might just try using some if
statements instead


-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 13 June 2002 12:33
To: Access ASP
Subject: [access_asp] Re: radio buttons


Hi, this shouldn't be too hard. In your page the radiobuttons have the
same name. The difference is the value:

i.e.

<input type='radio' name='radiobutton' value='1'>
<input type='radio' name='radiobutton' value='2'>
<input type='radio' name='radiobutton' value='3'>

When submitting the page, you request for the radiobutton.
Is option 1 is changed to 2 the requestobject will return 2
(Request("RadioButton")). This value you can store in your DB.

But what you have to do is use one field. So don't use 3 field in this
example. Define a table like TBL_TableName  and field FLD_FieldName.
In the FLD_FieldName you store the value of the radiobutton. In this case
the value used to be 1 and is changed to 2. Does this help you. I think
you defined a field for each radio-option. That I wouldn't do.

Greetzzz
Stephan



> I have an update page in which there is 3radio buttons on the page.
When the page is uploaded it reads the values from a database and one and
only one will radio button will appeared checked.
What i want to know is how can i update the database when i have checked a
different radio button.
Can anyone please help me


Message #5 by "Sean Dillon" <sdillon@b...> on Fri, 14 Jun 2002 10:02:01 +0100
Stephan,
Thanks for that.
But am i right in saying that code only writes the results to the database.
How can you read the results from the database and display the results onto
the form and allow the correct radio button to appear checked?


-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 13 June 2002 14:54
To: Access ASP
Subject: [access_asp] Re: radio buttons


Ok, so that was the problem. Well you could do something like this:

Dim btnRadioButton : btnRadioButton=1 'Default value is 1

btnRadioButton = rs("radiobuttonfield")

<input type='radio' name='radiobutton' value='1' <% If bntRadioButton=1
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='2' <% If bntRadioButton=2
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='3' <% If bntRadioButton=3
then response.write "CHECKED"%>>

As you can read. Default the var is filled with 1. So if no results are
returned the first option is checked.

Hope this helps.






Message #6 by s.bussing@i... on Fri, 14 Jun 2002 10:29:06
Hi Sean,

maybe we don't understand eachother, but the code I provided reads the 
values from the DB.

Dim btnRadioButton : btnRadioButton=1 'Default value is 1

'The values are read from a select statement which could be something like
' SELECT radionbuttonfield,namefield FROM table
btnRadioButton = rs("radiobuttonfield")

<input type='radio' name='radiobutton' value='1' <% If bntRadioButton=1
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='2' <% If bntRadioButton=2
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='3' <% If bntRadioButton=3
then response.write "CHECKED"%>>

As explained before, if no value is returned the default value is 1. But 
lets assume that rs("radiobuttonfield") returns the value 2. In this case, 
only option 2 is checked. It's not necessary to have a default value. In 
that case change the initial option to 0, then no option is checked.

If you user changes the form and checks option 3 (of course option 2 will 
then be unchecked) and posts the form, you can read the value from the form
(request("radionbutton")). You'll see that the value that's returned is 3 
instead of 2. This value you write to the DB.

Summary: The first part just reads the values from the database. In the 
form you can change the values. When you post the form the new value 
checked, in my exaple this would be option 3, can be written to the DB.

Goog luck



> Stephan,
Thanks for that.
But am i right in saying that code only writes the results to the database.
How can you read the results from the database and display the results onto
the form and allow the correct radio button to appear checked?


-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 13 June 2002 14:54
To: Access ASP
Subject: [access_asp] Re: radio buttons


Ok, so that was the problem. Well you could do something like this:

Dim btnRadioButton : btnRadioButton=1 'Default value is 1

btnRadioButton = rs("radiobuttonfield")

<input type='radio' name='radiobutton' value='1' <% If bntRadioButton=1
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='2' <% If bntRadioButton=2
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='3' <% If bntRadioButton=3
then response.write "CHECKED"%>>

As you can read. Default the var is filled with 1. So if no results are
returned the first option is checked.

Hope this helps.






Message #7 by "Sean Dillon" <sdillon@b...> on Fri, 14 Jun 2002 11:24:11 +0100
Stephan,
Sorry about all this hassle but does this code seem ok to you:


<%Dim check
Select CheckValue FROM cashcarry
btnRadioButton=1 'Default value is 1

		btnRadioButton=rs("CheckValue")%>

		<P><B>Pending:</B>
        <input type="radio" name="check" value='1' <% If btnRadioButton="1"
THEN Response.Write "checked"%>>
		<P><B>Accepted:</B>
		<input type="radio" name="check" value='2' <% If btnRadioButton="2" THEN
Response.Write "checked"%>>
		<P><B>Rejected:</B>
		<input type="radio" name="check" value='3' <% If btnRadioButton="3" THEN
Response.Write "checked"%>>


-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 14 June 2002 10:29
To: Access ASP
Subject: [access_asp] Re: radio buttons


Hi Sean,

maybe we don't understand eachother, but the code I provided reads the
values from the DB.

Dim btnRadioButton : btnRadioButton=1 'Default value is 1

'The values are read from a select statement which could be something like
' SELECT radionbuttonfield,namefield FROM table
btnRadioButton = rs("radiobuttonfield")

<input type='radio' name='radiobutton' value='1' <% If bntRadioButton=1
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='2' <% If bntRadioButton=2
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='3' <% If bntRadioButton=3
then response.write "CHECKED"%>>

As explained before, if no value is returned the default value is 1. But
lets assume that rs("radiobuttonfield") returns the value 2. In this case,
only option 2 is checked. It's not necessary to have a default value. In
that case change the initial option to 0, then no option is checked.

If you user changes the form and checks option 3 (of course option 2 will
then be unchecked) and posts the form, you can read the value from the form
(request("radionbutton")). You'll see that the value that's returned is 3
instead of 2. This value you write to the DB.

Summary: The first part just reads the values from the database. In the
form you can change the values. When you post the form the new value
checked, in my exaple this would be option 3, can be written to the DB.

Goog luck




Message #8 by s.bussing@i... on Fri, 14 Jun 2002 13:01:37
Sean, no problem. Your code seems oke to me. The only thing I don't 
underdstand why you defined the check variable. It's not used in your 
code. But further it's exactly what I mean. Does it work out?


Greetzzzzz


> Stephan,
Sorry about all this hassle but does this code seem ok to you:


<%Dim check
Select CheckValue FROM cashcarry
btnRadioButton=1 'Default value is 1

		btnRadioButton=rs("CheckValue")%>

		<P><B>Pending:</B>
        <input type="radio" name="check" value='1' <% If btnRadioButton="1"
THEN Response.Write "checked"%>>
		<P><B>Accepted:</B>
		<input type="radio" name="check" value='2' <% If 
btnRadioButton="2" THEN
Response.Write "checked"%>>
		<P><B>Rejected:</B>
		<input type="radio" name="check" value='3' <% If 
btnRadioButton="3" THEN
Response.Write "checked"%>>


-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 14 June 2002 10:29
To: Access ASP
Subject: [access_asp] Re: radio buttons


Hi Sean,

maybe we don't understand eachother, but the code I provided reads the
values from the DB.

Dim btnRadioButton : btnRadioButton=1 'Default value is 1

'The values are read from a select statement which could be something like
' SELECT radionbuttonfield,namefield FROM table
btnRadioButton = rs("radiobuttonfield")

<input type='radio' name='radiobutton' value='1' <% If bntRadioButton=1
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='2' <% If bntRadioButton=2
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='3' <% If bntRadioButton=3
then response.write "CHECKED"%>>

As explained before, if no value is returned the default value is 1. But
lets assume that rs("radiobuttonfield") returns the value 2. In this case,
only option 2 is checked. It's not necessary to have a default value. In
that case change the initial option to 0, then no option is checked.

If you user changes the form and checks option 3 (of course option 2 will
then be unchecked) and posts the form, you can read the value from the form
(request("radionbutton")). You'll see that the value that's returned is 3
instead of 2. This value you write to the DB.

Summary: The first part just reads the values from the database. In the
form you can change the values. When you post the form the new value
checked, in my exaple this would be option 3, can be written to the DB.

Goog luck




Message #9 by s.bussing@i... on Fri, 14 Jun 2002 13:03:44
Hi Sean, this is exactly what I mean. But where do you use the check var.? 
Anyway, did it work out?

Greetzzz


> Stephan,
Sorry about all this hassle but does this code seem ok to you:


<%Dim check
Select CheckValue FROM cashcarry
btnRadioButton=1 'Default value is 1

		btnRadioButton=rs("CheckValue")%>

		<P><B>Pending:</B>
        <input type="radio" name="check" value='1' <% If btnRadioButton="1"
THEN Response.Write "checked"%>>
		<P><B>Accepted:</B>
		<input type="radio" name="check" value='2' <% If 
btnRadioButton="2" THEN
Response.Write "checked"%>>
		<P><B>Rejected:</B>
		<input type="radio" name="check" value='3' <% If 
btnRadioButton="3" THEN
Response.Write "checked"%>>


-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 14 June 2002 10:29
To: Access ASP
Subject: [access_asp] Re: radio buttons


Hi Sean,

maybe we don't understand eachother, but the code I provided reads the
values from the DB.

Dim btnRadioButton : btnRadioButton=1 'Default value is 1

'The values are read from a select statement which could be something like
' SELECT radionbuttonfield,namefield FROM table
btnRadioButton = rs("radiobuttonfield")

<input type='radio' name='radiobutton' value='1' <% If bntRadioButton=1
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='2' <% If bntRadioButton=2
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='3' <% If bntRadioButton=3
then response.write "CHECKED"%>>

As explained before, if no value is returned the default value is 1. But
lets assume that rs("radiobuttonfield") returns the value 2. In this case,
only option 2 is checked. It's not necessary to have a default value. In
that case change the initial option to 0, then no option is checked.

If you user changes the form and checks option 3 (of course option 2 will
then be unchecked) and posts the form, you can read the value from the form
(request("radionbutton")). You'll see that the value that's returned is 3
instead of 2. This value you write to the DB.

Summary: The first part just reads the values from the database. In the
form you can change the values. When you post the form the new value
checked, in my exaple this would be option 3, can be written to the DB.

Goog luck




Message #10 by "Ken Schaefer" <ken@a...> on Mon, 17 Jun 2002 13:46:48 +1000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sean Dillon" <sdillon@b...>
Subject: [access_asp] Re: radio buttons


: Stephan,
: Sorry about all this hassle but does this code seem ok to you:
: <P><B>Pending:</B>
:         <input type="radio" name="check" value='1' <% If
btnRadioButton="1"
: THEN Response.Write "checked"%>>
: <P><B>Accepted:</B>
: <input type="radio" name="check" value='2' <% If btnRadioButton="2" THEN
: Response.Write "checked"%>>
: <P><B>Rejected:</B>
: <input type="radio" name="check" value='3' <% If btnRadioButton="3" THEN
: Response.Write "checked"%>>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It is better to do this type of thing in a routine - since it is repetitive
code. That way you can just call the routine passing in the requisite
parameters, and it will return the appropriate HTML which you can
Response.Write() to the screen. This is the function I use for writing Radio
buttons (watch for line wrapping):

'------------------------------------------------------------
' --- WriteFormRadioButton
'------------------------------------------------------------
' --- Returns HTML for a <radio> element
' --- Accepts strName as string
' --- Accepts strID as string
' --- Accepts strHTMLAttributes as string
' --- Accepts strValue as string
' --- Accepts strCheckedValue as string. If strCheckedValue = strValue
' --- then "checked" is written to the HTML stream
'------------------------------------------------------------
Function WriteFormRadioButton( _
 ByVal strName, _
 ByVal strID, _
 ByVal strHTMLAttributes, _
 ByVal strValue, _
 ByVal strCheckedValue _
 )

 WriteFormRadioButton = "<input type=""radio"" name=""" & strName & """
ID=""" & strID & """"

 If Len(strHTMLAttributes & "") > 0 then
  WriteFormRadioButton = WriteFormRadioButton & " " & strHTMLAttributes &
""""
 End If

 WriteFormRadioButton = WriteFormRadioButton & " value=""" & strValue & """"

 If CStr(strValue) = CStr(strCheckedValue) then
  WriteFormRadioButton = WriteFormRadioButton & " checked"
 End If

 WriteFormRadioButton = WriteFormRadioButton & ">"

End Function
'------------------------------------------------------------
' --- WriteFormRadioButton
'------------------------------------------------------------


Message #11 by "Sean Dillon" <sdillon@b...> on Mon, 17 Jun 2002 16:17:15 +0100
Sorry that variable should have been CheckValue instead of check.
The code now reads

	<%Dim Status

	Status=1 'Default value is 1
	Status = rs("Status")
	%>
  <%'SQL statement: <%=SQLstmt%>
  <B>Update Page</B>
  <HR>


	<input type='radio' name='check' value='1' <% If Status=1 Then
Response.Write "CHECKED"%>>
	<input type='radio' name='check' value='2' <% If Status=2 Then
Response.Write "CHECKED"%>>
	<input type='radio' name='check' value='3' <% If Status=3 Then
Response.Write "CHECKED"%>>


	 IF NOT RS.EOF THEN
	 %>

But this still doesn't seem to work.

-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 14 June 2002 13:04
To: Access ASP
Subject: [access_asp] Re: radio buttons


Hi Sean, this is exactly what I mean. But where do you use the check var.?
Anyway, did it work out?

Greetzzz


> Stephan,
Sorry about all this hassle but does this code seem ok to you:


<%Dim check
Select CheckValue FROM cashcarry
btnRadioButton=1 'Default value is 1

		btnRadioButton=rs("CheckValue")%>

		<P><B>Pending:</B>
        <input type="radio" name="check" value='1' <% If btnRadioButton="1"
THEN Response.Write "checked"%>>
		<P><B>Accepted:</B>
		<input type="radio" name="check" value='2' <% If
btnRadioButton="2" THEN
Response.Write "checked"%>>
		<P><B>Rejected:</B>
		<input type="radio" name="check" value='3' <% If
btnRadioButton="3" THEN
Response.Write "checked"%>>


-----Original Message-----
From: s.bussing@i... [mailto:s.bussing@i...]
Sent: 14 June 2002 10:29
To: Access ASP
Subject: [access_asp] Re: radio buttons


Hi Sean,

maybe we don't understand eachother, but the code I provided reads the
values from the DB.

Dim btnRadioButton : btnRadioButton=1 'Default value is 1

'The values are read from a select statement which could be something like
' SELECT radionbuttonfield,namefield FROM table
btnRadioButton = rs("radiobuttonfield")

<input type='radio' name='radiobutton' value='1' <% If bntRadioButton=1
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='2' <% If bntRadioButton=2
then response.write "CHECKED"%>>
<input type='radio' name='radiobutton' value='3' <% If bntRadioButton=3
then response.write "CHECKED"%>>

As explained before, if no value is returned the default value is 1. But
lets assume that rs("radiobuttonfield") returns the value 2. In this case,
only option 2 is checked. It's not necessary to have a default value. In
that case change the initial option to 0, then no option is checked.

If you user changes the form and checks option 3 (of course option 2 will
then be unchecked) and posts the form, you can read the value from the form
(request("radionbutton")). You'll see that the value that's returned is 3
instead of 2. This value you write to the DB.

Summary: The first part just reads the values from the database. In the
form you can change the values. When you post the form the new value
checked, in my exaple this would be option 3, can be written to the DB.

Goog luck





Message #12 by "Ken Schaefer" <ken@a...> on Tue, 18 Jun 2002 08:58:05 +1000
You say "it doesn't work", but you don't define "doesn't work". I assume you
mean that the radio button you want checked isn't.

Checking a radio button using your code below requires that Status = 1 or
Status = 2 or Status = 3

However, we don't know what Status is equal to, because you do:

Status = rs("Status")

rs("Status") might equal 4, or it might be equal to "4", (subtype String
rather than subtype Integer), hence no radio button will be checked. I
suggest you look at the code I posted re using a routine to handle this, as
one of the things the routine does is *cast* the inputs as subtype string
before doing a comparison.

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sean Dillon" <sdillon@b...>
Subject: [access_asp] Re: radio buttons


: Sorry that variable should have been CheckValue instead of check.
: The code now reads
:
: <%Dim Status
:
: Status=1 'Default value is 1
: Status = rs("Status")
: %>
:   <%'SQL statement: <%=SQLstmt%>
:   <B>Update Page</B>
:   <HR>
:
:
: <input type='radio' name='check' value='1' <% If Status=1 Then
: Response.Write "CHECKED"%>>
: <input type='radio' name='check' value='2' <% If Status=2 Then
: Response.Write "CHECKED"%>>
: <input type='radio' name='check' value='3' <% If Status=3 Then
: Response.Write "CHECKED"%>>
:
:
: IF NOT RS.EOF THEN
: %>
:
: But this still doesn't seem to work.


Message #13 by "Sean Dillon" <sdillon@b...> on Tue, 18 Jun 2002 10:17:37 +0100
I have the radio buttons working so the values are been read from the
database in a field called 'Status' and are been displayed onto the form but
im having problems when i use an update page to update these buttons.
The code i am using to update the database is

ELSEIF Request.Form("flag")="2" THEN

  SQLstmt ="UPDATE cashcarry (Status)"


   SQLstmt ="UPDATE cashcarry SET"
   SQLstmt = SQLstmt & "Status='" & TRIM(Status) &"'"
   SQLstmt = SQLstmt & "WHERE SheetNo="& TRIM(Request.Form("Recordid"))

-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: 17 June 2002 23:58
To: Access ASP
Subject: [access_asp] Re: radio buttons


You say "it doesn't work", but you don't define "doesn't work". I assume you
mean that the radio button you want checked isn't.

Checking a radio button using your code below requires that Status = 1 or
Status = 2 or Status = 3

However, we don't know what Status is equal to, because you do:

Status = rs("Status")

rs("Status") might equal 4, or it might be equal to "4", (subtype String
rather than subtype Integer), hence no radio button will be checked. I
suggest you look at the code I posted re using a routine to handle this, as
one of the things the routine does is *cast* the inputs as subtype string
before doing a comparison.

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sean Dillon" <sdillon@b...>
Subject: [access_asp] Re: radio buttons


: Sorry that variable should have been CheckValue instead of check.
: The code now reads
:
: <%Dim Status
:
: Status=1 'Default value is 1
: Status = rs("Status")
: %>
:   <%'SQL statement: <%=SQLstmt%>
:   <B>Update Page</B>
:   <HR>
:
:
: <input type='radio' name='check' value='1' <% If Status=1 Then
: Response.Write "CHECKED"%>>
: <input type='radio' name='check' value='2' <% If Status=2 Then
: Response.Write "CHECKED"%>>
: <input type='radio' name='check' value='3' <% If Status=3 Then
: Response.Write "CHECKED"%>>
:
:
: IF NOT RS.EOF THEN
: %>
:
: But this still doesn't seem to work.




Message #14 by "Ken Schaefer" <ken@a...> on Wed, 19 Jun 2002 12:15:10 +1000
Sean,

Do you even bother to read what I write? I'm going to "cut-n-paste"
something from my previous message.

<quote>
You say "it doesn't work", but you don't define "doesn't work".
</quote>

Doesn't work could mean "I get an error"
Doesn't work could mean "I doesn't do what I want, it does something else"
Doesn't work could mean "It doesn't do anything at all"

Unless you tell us in more detail what it is that is "not working", we're
just all flailing around in the dark - each of the above three "doesn't
work" scenarios has a number of possible causes. Please help us to help you!

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sean Dillon" <sdillon@b...>
Subject: [access_asp] Re: radio buttons


: I have the radio buttons working so the values are been read from the
: database in a field called 'Status' and are been displayed onto the form
but
: im having problems when i use an update page to update these buttons.
: The code i am using to update the database is
:
: ELSEIF Request.Form("flag")="2" THEN
:
:   SQLstmt ="UPDATE cashcarry (Status)"
:
:
:    SQLstmt ="UPDATE cashcarry SET"
:    SQLstmt = SQLstmt & "Status='" & TRIM(Status) &"'"
:    SQLstmt = SQLstmt & "WHERE SheetNo="& TRIM(Request.Form("Recordid"))


Message #15 by "Sean Dillon" <sdillon@b...> on Wed, 19 Jun 2002 11:52:02 +0100
I have it all sorted.
Everytime i went to update a record i used to get a blank screen instead of
a page saying that the user had just updated a record.
The problem was i had code before the code for the form which read
IF NOT RS.EOF THEN
but i had put my End If in the wrong place.

Do you know if there is any decent debuggers for asp??

-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: 19 June 2002 03:15
To: Access ASP
Subject: [access_asp] Re: radio buttons


Sean,

Do you even bother to read what I write? I'm going to "cut-n-paste"
something from my previous message.

<quote>
You say "it doesn't work", but you don't define "doesn't work".
</quote>

Doesn't work could mean "I get an error"
Doesn't work could mean "I doesn't do what I want, it does something else"
Doesn't work could mean "It doesn't do anything at all"

Unless you tell us in more detail what it is that is "not working", we're
just all flailing around in the dark - each of the above three "doesn't
work" scenarios has a number of possible causes. Please help us to help you!

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Sean Dillon" <sdillon@b...>
Subject: [access_asp] Re: radio buttons


: I have the radio buttons working so the values are been read from the
: database in a field called 'Status' and are been displayed onto the form
but
: im having problems when i use an update page to update these buttons.
: The code i am using to update the database is
:
: ELSEIF Request.Form("flag")="2" THEN
:
:   SQLstmt ="UPDATE cashcarry (Status)"
:
:
:    SQLstmt ="UPDATE cashcarry SET"
:    SQLstmt = SQLstmt & "Status='" & TRIM(Status) &"'"
:    SQLstmt = SQLstmt & "WHERE SheetNo="& TRIM(Request.Form("Recordid"))





  Return to Index