Hi,
I have a recordset containing names of photographs and descriptions of these
photo's.
For exempla:
Photo: car01.jpg
Description: Red Corvette
Not all the photographs have a description. In that case the Description is
empty.
The field Description is aText-field.
Using VBA I build a website containing the photos. Depending on having a
description I want a certain presentastion of the photo. So I built the
following:
Selecet Case Description
Case Null
Print #1, presentation1
Case Else
Print #1, presentation2
End Select
This Case-statement doesn't work because it doesn't recognize when the field
Description is empty.
My question is how to write the Case-statement so it will recognize when an
text-field in a record is empty.
Must I do something with the properties of the textfield? Has it possibly
something to do with the fact I use a Dutch version of Access97 and an
English version of XP?
Thanks. 2 9168
No, Select Case won't deal with null as one of the conditions. Very annoying,
and I usually kludge around it with something like
Select Case Description & " "
in which case I can do
Case " "
for that null case.
Make any sense? I'd love to hear a more elegant solution from someone else.
Jan Selecet Case Description Case Null Print #1, presentation1 Case Else Print #1, presentation2 End Select
This Case-statement doesn't work because it doesn't recognize when the field Description is empty.
My question is how to write the Case-statement so it will recognize when an text-field in a record is empty.
Must I do something with the properties of the textfield? Has it possibly something to do with the fact I use a Dutch version of Access97 and an English version of XP?
Jan Stempel
Stempel Consulting
> Selecet Case Description Case Null Print #1, presentation1 Case Else Print #1, presentation2 End Select
This Case-statement doesn't work because it doesn't recognize when the field Description is empty.
My question is how to write the Case-statement so it will recognize when an text-field in a record is empty.
'***
Select Case [Description] & ""
Case ""
...
'***
:-)
--
Bruce M. Thompson, Microsoft Access MVP bt******@mvps.o rg (See the Access FAQ at http://www.mvps.org/access) NO Email Please. Keep all communications
within the newsgroups so that all might benefit.<< This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: |
last post by:
Is it possible to extend this function to dynamically create a combo boxes
from the db table....How would do this...I tried passing a 'Select' type to
the function but got a blank entry....Any ideas?
function BuildInput(sType,sName,sValue,iSize,iLength)
select case sType
case "text":
BuildInput = "<INPUT TYPE=""text"" NAME=""" & sName & """ VALUE=""" &
sValue & """ SIZE=""" & iSize & """ MAXLENGTH=""" & iLength & """>"
case "password"
|
by: ST |
last post by:
Hi, I'm trying to debug someone else's code, and I'm going thru this Select
Case statement. I'm having problems with the "OTHER" case...in that when the
first line of the case is false, it jumps to the end of the select case
block, instead of finishing going thru the rest of the cases (and thereby
reaching the next "OTHER" case). Can anyone explain this to me?? Thanks!
I've put ***** where things seems to mess up!
Select Case...
|
by: Michael |
last post by:
I have a problem forcing files to download. If I select Save the document is
saved with no problems. If I select "Open" the document is empty or I get a
"File not found" error from the application opening the file...
Code:
function UTIL_ForceDownloadFile(strFileName, strFileSaveName)
Response.Buffer = True
Dim strFileSize
Const adTypeBinary = 1
|
by: mark.irwin |
last post by:
Hello all,
Have an issue where a redirect pushes data to a page with a select case
which then redirects to another page. Problem is the redirect isnt
working in 1 case. Code below:
strURL = ""
if i = 1 then
strURL = "redirect.aspx?page=APIQ&parcel=" & strParcel &
|
by: Kyle Novak |
last post by:
Okay, so I have the chunk of code below which is trying to determine the
value of a decimal. No matter what I do, none of the case statements are
entered. I've tried several different formats of the "Case dTotal > 0D"
such as...
-Case (dTotal > 0)
-Case dTotal > 0D
-Case dTotal > 0.0
-Case dTotal > 0.0D
| |
by: gozzer101 |
last post by:
Hello all. I have managed to get the select case statements working using the following code:
Dim strwhichoption As String
strwhichoption = ComboBox1
ComboBox1.AddItem ("Reina")
ComboBox1.AddItem ("Sorensen")
ComboBox1.AddItem ("Cudicini")
ComboBox1.AddItem ("Van Der Sar")
|
by: nfenlon |
last post by:
I'm new to VB express 2005 and am having some trouble with coding.
I'm using a CASE structure in my program and i'm wondering if anyone can help me. Instead of Saying "Case 1,2,3,4" is there a way of saying "1 to 4". I've tried everything and nothing works.
(TextBox1.Text >= 1) And (TextBox1.Text <= 4) didn't work either.
PS: the actual problem is a bit more complex than just 1,2,3,4
Thanks guys, hope you can help.
Select Case...
|
by: gregincolumbus |
last post by:
I am trying to get the financial calculation on this to trigger whenever there is a change to select1. Right now, the user has to click on select2 to trigger the changes.
Ideally, a change of select1
1. trigger the population of select2 (and set it initially to 0)
2. make the text fields disappear
3. trigger the financial calculation to reflect the select1 choice.
Any help would be greatly appeciated !
|
by: troy_lee |
last post by:
I have a form that acts a filter. All of the filtering objects are in
the header and the results are displayed in a continuous form in the
detail section.
In the header, I have a text box (txtCountRecords) with the control
source ="Your filter returned " & Count(*) & " units." Everything
works great until I clear the filter and null out all of the objects
in the header. Here is the code for that:
Private Sub cmdReset_Click()
|
by: tjc0ol |
last post by:
Hi guys,
I'm a newbie in php and I got error in my index.php which is:
1054 - Unknown column 'p.products_id' in 'on clause'
select p.products_image, pd.products_name, p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from products_description pd,...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |