CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Change text if

Print topic Send  topic

Author Message
Mikaa

Posts: 9
Posted: 03/13/2006, 3:12 AM

Hi there,

<div id="VALUE">

Is it possible to have above "VALUE" changed based on a field in the DB?

Should i use a label?

Thanks for the reply.

regards,
Mikaa
View profile  Send private message
mhope

Posts: 37
Posted: 03/13/2006, 5:43 PM

Yes, use a label as follows:

If grid.field.value = “Your database value” Then
Label1.value = “Your value”
Else
Label1.Value = “Other value”
End If

Also if the value in the Lable1 is HTML make sure to set that parameter in the design properties. Further if your label is in the grid then the label should be grid.Label1.Value = "Your value" on line 2
View profile  Send private message
mhope

Posts: 37
Posted: 03/13/2006, 5:46 PM

Also, place the code in a before show event too
View profile  Send private message
Mikaa

Posts: 9
Posted: 03/13/2006, 11:46 PM

Thanks mhope. That part is clear now!

Since this code is not in a form, i must use "Lookup", but the "VALUE" is changed every time a <option> changes.

for example:

<OPTION VALUE="1">A</OPTION>
<OPTION VALUE="2">B</OPTION>
<OPTION VALUE="3">C</OPTION>

And these options are different every time and can be more then 3. This is based on the date.

So it should be
If value = “Your database value from option” Then
Label1.value = “Your value”
Else
Label1.Value = “Other value”
End If

How can I solve this?
View profile  Send private message
mhope

Posts: 37
Posted: 03/13/2006, 11:56 PM

Then use a case select like:

select case Label1.value
case 1
lable1.Value = "The value 1"

case 2
lable1.Value = "The value1"
ect.....
end select
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.