473,246 Members | 1,383 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

Show if DB field NOT NULL

What is the correct code to use to hide a section if a specific DB field is
NULL.

Thanks
Jul 19 '05 #1
7 25045
"Keith" wrote:
What is the correct code to use to hide a section if a specific DB
field is NULL.


Define "hide a section".
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #2
On Fri, 9 Jul 2004 23:39:15 +0100, "Keith" <@.> wrote:
What is the correct code to use to hide a section if a specific DB field is
NULL.


Hide a section as in using DHTML to hide/unhide? Try a DHTML group
for that answer.

If you're looking for an ASP-only answer:

IF DBField <> Null Then
Response.Write "Hidden Section"
End If

Jeff
Jul 19 '05 #3
Sorry - badly written question.

Hide a section as in don't process a section of the page if a DB field is
NULL

"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:40*********************@newsreader.visi.com.. .
"Keith" wrote:
What is the correct code to use to hide a section if a specific DB
field is NULL.
Define "hide a section".
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.

Use of this email address implies consent to these terms. Please do not contact me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Jul 19 '05 #4
Jeff Cochran wrote:
On Fri, 9 Jul 2004 23:39:15 +0100, "Keith" <@.> wrote:
What is the correct code to use to hide a section if a specific DB
field is NULL.


Hide a section as in using DHTML to hide/unhide? Try a DHTML group
for that answer.

If you're looking for an ASP-only answer:

IF DBField <> Null Then
Response.Write "Hidden Section"
End If

Jeff

Minor correction:
IF Not DBField Is Null Then

or

If IsNull(DBField) = False Then

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #5
On Sat, 10 Jul 2004 08:50:10 -0400, "Bob Barrows [MVP]"
<re******@NOyahoo.SPAMcom> wrote:
Jeff Cochran wrote:
On Fri, 9 Jul 2004 23:39:15 +0100, "Keith" <@.> wrote:
What is the correct code to use to hide a section if a specific DB
field is NULL.


Hide a section as in using DHTML to hide/unhide? Try a DHTML group
for that answer.

If you're looking for an ASP-only answer:

IF DBField <> Null Then
Response.Write "Hidden Section"
End If

Jeff

Minor correction:
IF Not DBField Is Null Then

or

If IsNull(DBField) = False Then


Bleh! Should stop answering posts at 2:00 am... :)

Especially since I just ran through an IsNull() programming section
during the day.

Jeff
Jul 19 '05 #6
On Sat, 10 Jul 2004 13:34:28 +0100, "Keith" <@.> wrote:
Sorry - badly written question.

Hide a section as in don't process a section of the page if a DB field is
NULL
You can't "not process a page" because until you process the page you
can't determine if the field is null. You can branch based on it
being null, or else you'll need to use two pages, or try to accomplish
a conditional include, which is more work thatn the system should do.

Jeff
"Dave Anderson" <GT**********@spammotel.com> wrote in message
news:40*********************@newsreader.visi.com. ..
"Keith" wrote:
> What is the correct code to use to hide a section if a specific DB
> field is NULL.


Define "hide a section".
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.

Use
of this email address implies consent to these terms. Please do not

contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


Jul 19 '05 #7
IF (NOT ISNULL(DBField)) THEN
' Do something
ELSE
' Do Something else
END IF

This works best for me...
Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter Neumaier | last post by:
Hi! I got a column, with different dates in it (Ddata type "nvarchar")... when running a SELECT on this column, I'm trying to filter those recordsets out, WHERE this column is NULL (I checked...
1
by: xixi | last post by:
we are using db2 udb v8.1 , from db2 command window, how can i see the value which has null in it? cause right now i only see it is blank, not knowing actually it is a null value, i can only know...
5
by: msnews.microsoft.com | last post by:
Hello. How can I check if DataSet field value is Null?
2
by: Sam | last post by:
Access quickie question- Have a table called ValidAxes. Design as follows- FieldName Type Null OK ? -------------------------------- ProcessType Text NO EEType Text ...
1
by: gtwannabe | last post by:
I'm having a problem with a form that uses AutoNumber as the primary key. I have an Abort button to delete the current record and close the form. If AutoNumber is assigned, the code executes a...
1
by: aboon | last post by:
Hi I need help with showing field when checkbox checked and hiding field when the checkbox is unchecked. I was able to do it using dropdownlist but I'm not able to do it with checkboxlist at all....
2
by: Resmy Ravi | last post by:
how to make a field null in access
3
by: BobbyD1120 | last post by:
I have created a inventory tracking database and I want to show/hide certain fields based on the device category. The deviceCategory field is a lookup field to a table that lists all the different...
1
by: sumreen hassan | last post by:
how to show all null fields of query during run time? for example if one column of record is null all record is skiped please help me about this problem
1
by: ramyasakthi | last post by:
how to catch the appropriate null pointer exception for preparestatement while insert to oracle db
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.