Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: insert null value into website when form element left blank


Message #1 by jake williamson 28 <jake.williamson@2...> on Wed, 12 Jun 2002 14:13:21 +0100
hello!

i've been writing an if statement that looks to see if a column value is
null and then returns a yes or no value. this all works.

my database is made from importing a excel sheet. where elements are blank,
they return a null value in my recordset and everything works.

but when i use my insert recordset form the value is just blank rather than
null!!

this really mucks up my if statement...

so, how do i get the access database to show a null value if a user leaves a
form element blank?

help!

cheers,

jake

Message #2 by "Ken Schaefer" <ken@a...> on Thu, 13 Jun 2002 15:12:30 +1000
<%
strVar = Request.Form("txtFormField")
If Len(strVar & "") = "" then strVar = NULL
%>

Now you can use strVar in your SQL statement


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "jake williamson 28" <jake.williamson@2...>
Subject: [access_asp] insert null value into website when form element left
blank


: i've been writing an if statement that looks to see if a column value is
: null and then returns a yes or no value. this all works.
:
: my database is made from importing a excel sheet. where elements are
blank,
: they return a null value in my recordset and everything works.
:
: but when i use my insert recordset form the value is just blank rather
than
: null!!
:
: this really mucks up my if statement...
:
: so, how do i get the access database to show a null value if a user leaves
a
: form element blank?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


  Return to Index