I would agree setting a known default is a better option because it doesn't require any testing
The test that was posted checks for a space (> " ") as a Boolean result
<% If fp_rs("Municipality") > " " then %>
That is a Boolean comparison for > " "
- not a zero-length string ("") test,
Which will fail (evaluate to False) if there is a character = " " in the field, or any other character in the field evaluating to or
less than a space
Probably better to check for a string length (rather than a space or zero-length string)
<% If Len(fp_rs("Municipality"))> 0 then %>
And that also doesn't check for a Null field as opposed to an empty string or zero-length string
At best it should also check for any Null as say:
<% If ( Not IsNull(fp_rs("Municipality")) ) OR ( Len(fp_rs("Municipality"))> 0 ) Then %>
--
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp
_____________________________________________
"Thomas A. Rowe" <(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
| However Paul M, solution would also solve the problem, as the fields would never be empty, therefore
| no test (IF statement) would be need to determine if the field is empty
|
| --
| ==============================================
| Thomas A. Rowe (Microsoft MVP - FrontPage)
| ==============================================
| If you feel your current issue is a results of installing
| a Service Pack or security update, please contact
| Microsoft Product Support Services:
|
http://support.microsoft.com
| If the problem can be shown to have been caused by a
| security update, then there is usually no charge for the call.
| ==============================================
|
| "Kathleen Anderson [MVP - FrontPage]" <(E-Mail Removed)> wrote in message
| news:(E-Mail Removed)...
| >I believe he is asking how to populate the field on a query results page, not populate the database
| >field during an update.
| >
| > --
| > ~ Kathleen Anderson
| > Microsoft MVP - FrontPage
| > Spider Web Woman Designs
| > web:
http://www.spiderwebwoman.com/resources/
| >
| >
| > "Paul M" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
| >> Hi
| >> You can open the database table in access click on the veiw button (top left)and set the
| >> default to 0 for number fields or text for text fields if you use text put the text in quotes
| >> "Call". then when the database is being populated if nothing is entered into the field it will
| >> display the default
| >> Paul M
| >> "mccloud" <(E-Mail Removed)> wrote in message
| >> news:E5AA9FE0-A55F-45AD-86E1-(E-Mail Removed)...
| >>>I have an Access database query that feeds a frontpage web site. I have a
| >>> text field and a Currency field. My question is there a way to populate a
| >>> default value when the field is blank. For example in the text field when
| >>> blank display" Call" and in the Currency field dispaly "0".
| >>>
| >>> Thanks in advance for your help!
| >>
| >>
| >
| >
|
|