Skip to main content
Inspiring
April 30, 2007
Question

Need to apply a label based on db content

  • April 30, 2007
  • 1 reply
  • 186 views
Hi, I have an Access database given to me by a client, and I can't change anything about it because of other uses that the db is put to other than the website.

Within the db is a table that holds a field called address type. That address type could be business or private. My problem is that the entry in to that field is either a B or a P to indicate what sort of address it is.

What I need to be able to do is replace the B or P with Business or Private ,but have no idea on how to do so. Has anybody got any ideas?

The closest I can think of is using a static drop down menu and take the value and apply a label to it, but I don't want a menu, I need basic text to display.

Thanks

Mat
This topic has been closed for replies.

1 reply

Inspiring
April 30, 2007
if label="B" then response.write("Business") else response.write("Private")
end if

If you've got more than two choices, use "select case" instead (see
www.w3schools.com, Learn VBScript section for specifics).

"label" above is a stand-in for wherever you've stored the address type;
replace it with your local variable or recordset field reference.

"matthew stuart" <webforumsuser@macromedia.com> wrote in message
news:f14hu0$b6j$1@forums.macromedia.com...
> What I need to be able to do is replace the B or P with Business or
> Private
> ,but have no idea on how to do so. Has anybody got any ideas?