Masking textbox field

C

crxmen

Good Afternoon,

I would like to mask a text field so that if I do a search and it
returns a "%" then it gets replaced by, say, " " (a blank space). Any
suggestions?
 
J

Jim Buyens

-----Original Message-----
Good Afternoon,
Hpwdy.

I would like to mask a text field so that if I do a
search and it returns a "%" then it gets replaced by,
say, " " (a blank space). Any suggestions?

Are you trying to get rid of %'s in a text box that
specifies search criteria, or are you trying to get rid of
%'s that appear in the search results, or something else?

How are you performing this search? Via the FrontPage
Database Results Wizard? With custom ASP or ASP.NET code?
Something else?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
J

Jim Buyens

I'm still not sure I understand your question, but it sounds like
you're running the Database Results Wizard, and one of the output
fields has values that contain percent signs, and you'd rather display
spaces.

If that's it, then on page 2 of the wizard you need to click Custom
Query and Edit. This will display a SQL statement that probably
begins:

SELECT * FROM ...

Change this to:

SELECT Replace([myfield],'%',' ') AS modfield, * FROM ...

where myfield is the name of the database field that contains the
percent signs. Then click OK, advance to page 3 of the wizard, click
Edit List, remove the myfield field, and add the modfield field.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Top