Form Drop Down blank to Access

G

Guest

Using Fp 2002 with Access 2002 DB

Have a form with dropd own selection boxes that submit to the Access DB.
I need to have drop down boxes with an initial BLANK option that will submit
a true BLANK (null) to the DB if nothing else is selected.

Although NONE of the selection options are "selected" - they still appear in
the drop-down box on the form AND submit the displayed value to the DB.

I tried entering <option> Selected </option> with blank spaces which
accomplishes the goal of having a BLANK dappear in the drop down boxes on the
form. However, these fields SUBMIT spaces tothe database or something that
is not being interrupted as a blank.

Can anyone help?? Thx
 
K

Kathleen Anderson [MVP - FrontPage]

Try this as your first option:

<option value="">-- Choose one from this list (optional) --</option>


--

~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
web: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


Using Fp 2002 with Access 2002 DB

Have a form with dropd own selection boxes that submit to the Access DB.
I need to have drop down boxes with an initial BLANK option that will submit
a true BLANK (null) to the DB if nothing else is selected.

Although NONE of the selection options are "selected" - they still appear in
the drop-down box on the form AND submit the displayed value to the DB.

I tried entering <option> Selected </option> with blank spaces which
accomplishes the goal of having a BLANK dappear in the drop down boxes on
the
form. However, these fields SUBMIT spaces tothe database or something that
is not being interrupted as a blank.

Can anyone help?? Thx
 
S

Stefan B Rusynko

That would still submit an empty string to the DB
- not the same as a true Null

PS
IMHO it is bad practice to use Null as a result in any DB field that also contain values
- it causes too many problems / errors unless you always check for Null values before you attempt to use the DB field for anything
(and you then need to check for Null and also for an empty string)
- better to set the field to some known default value, say NA for text or 0 for a number, etc
(Then you are check for a known value for an Empty field)

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Try this as your first option:
|
| <option value="">-- Choose one from this list (optional) --</option>
|
|
| --
|
| ~ Kathleen Anderson
| Microsoft MVP - FrontPage
| Spider Web Woman Designs
| web: http://www.spiderwebwoman.com/resources/
| Please reply to the newsgroup for the benefit of others
|
|
| | Using Fp 2002 with Access 2002 DB
|
| Have a form with dropd own selection boxes that submit to the Access DB.
| I need to have drop down boxes with an initial BLANK option that will submit
| a true BLANK (null) to the DB if nothing else is selected.
|
| Although NONE of the selection options are "selected" - they still appear in
| the drop-down box on the form AND submit the displayed value to the DB.
|
| I tried entering <option> Selected </option> with blank spaces which
| accomplishes the goal of having a BLANK dappear in the drop down boxes on
| the
| form. However, these fields SUBMIT spaces tothe database or something that
| is not being interrupted as a blank.
|
| Can anyone help?? Thx
|
|
 
G

Guest

Stefan:
I think for Maureen's purpose, it would work for her.

How would you submit a true Null (if that's what you wanted to do)?


--
~ Kathleen Anderson
Microsoft MVP - FrontPage
Spider Web Woman Designs
http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others
 
S

Stefan B Rusynko

TBMK you don't
- If the field really is a Null field by default, you just skip that field when doing a submit
The Null keyword is used to indicate that a variable contains no valid data

PS
Also See
http://databases.aspfaq.com/databas...s-in-my-database-from-mucking-up-my-html.html

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Stefan:
| I think for Maureen's purpose, it would work for her.
|
| How would you submit a true Null (if that's what you wanted to do)?
|
|
| --
| ~ Kathleen Anderson
| Microsoft MVP - FrontPage
| Spider Web Woman Designs
| http://www.spiderwebwoman.com/resources/
| Please reply to the newsgroup for the benefit of others
|
| "Stefan B Rusynko" wrote:
|
| > That would still submit an empty string to the DB
| > - not the same as a true Null
| >
| > PS
| > IMHO it is bad practice to use Null as a result in any DB field that also contain values
| > - it causes too many problems / errors unless you always check for Null values before you attempt to use the DB field for
anything
| > (and you then need to check for Null and also for an empty string)
| > - better to set the field to some known default value, say NA for text or 0 for a number, etc
| > (Then you are check for a known value for an Empty field)
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > _____________________________________________
| >
| >
| > | Try this as your first option:
| > |
| > | <option value="">-- Choose one from this list (optional) --</option>
| > |
| > |
| > | --
| > |
| > | ~ Kathleen Anderson
| > | Microsoft MVP - FrontPage
| > | Spider Web Woman Designs
| > | web: http://www.spiderwebwoman.com/resources/
| > | Please reply to the newsgroup for the benefit of others
| > |
| > |
| > | | > | Using Fp 2002 with Access 2002 DB
| > |
| > | Have a form with dropd own selection boxes that submit to the Access DB.
| > | I need to have drop down boxes with an initial BLANK option that will submit
| > | a true BLANK (null) to the DB if nothing else is selected.
| > |
| > | Although NONE of the selection options are "selected" - they still appear in
| > | the drop-down box on the form AND submit the displayed value to the DB.
| > |
| > | I tried entering <option> Selected </option> with blank spaces which
| > | accomplishes the goal of having a BLANK dappear in the drop down boxes on
| > | the
| > | form. However, these fields SUBMIT spaces tothe database or something that
| > | is not being interrupted as a blank.
| > |
| > | Can anyone help?? Thx
| > |
| > |
| >
| >
| >
 
G

Guest

K & S,

Thanks to yo both! The blank worked for my purposes this time. In the
future I will take your advice and avoid nulls in db's -

THANK YOU!

Stefan B Rusynko said:
TBMK you don't
- If the field really is a Null field by default, you just skip that field when doing a submit
The Null keyword is used to indicate that a variable contains no valid data

PS
Also See
http://databases.aspfaq.com/databas...s-in-my-database-from-mucking-up-my-html.html

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Stefan:
| I think for Maureen's purpose, it would work for her.
|
| How would you submit a true Null (if that's what you wanted to do)?
|
|
| --
| ~ Kathleen Anderson
| Microsoft MVP - FrontPage
| Spider Web Woman Designs
| http://www.spiderwebwoman.com/resources/
| Please reply to the newsgroup for the benefit of others
|
| "Stefan B Rusynko" wrote:
|
| > That would still submit an empty string to the DB
| > - not the same as a true Null
| >
| > PS
| > IMHO it is bad practice to use Null as a result in any DB field that also contain values
| > - it causes too many problems / errors unless you always check for Null values before you attempt to use the DB field for
anything
| > (and you then need to check for Null and also for an empty string)
| > - better to set the field to some known default value, say NA for text or 0 for a number, etc
| > (Then you are check for a known value for an Empty field)
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > _____________________________________________
| >
| >
| > | Try this as your first option:
| > |
| > | <option value="">-- Choose one from this list (optional) --</option>
| > |
| > |
| > | --
| > |
| > | ~ Kathleen Anderson
| > | Microsoft MVP - FrontPage
| > | Spider Web Woman Designs
| > | web: http://www.spiderwebwoman.com/resources/
| > | Please reply to the newsgroup for the benefit of others
| > |
| > |
| > | | > | Using Fp 2002 with Access 2002 DB
| > |
| > | Have a form with dropd own selection boxes that submit to the Access DB.
| > | I need to have drop down boxes with an initial BLANK option that will submit
| > | a true BLANK (null) to the DB if nothing else is selected.
| > |
| > | Although NONE of the selection options are "selected" - they still appear in
| > | the drop-down box on the form AND submit the displayed value to the DB.
| > |
| > | I tried entering <option> Selected </option> with blank spaces which
| > | accomplishes the goal of having a BLANK dappear in the drop down boxes on
| > | the
| > | form. However, these fields SUBMIT spaces tothe database or something that
| > | is not being interrupted as a blank.
| > |
| > | Can anyone help?? Thx
| > |
| > |
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top