🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.databases.ms-access
2 messages
2 total messages Started by Ini Mon, 24 Nov 2003 14:07
Select Case on a text-field
#214
Author: Ini
Date: Mon, 24 Nov 2003 14:07
39 lines
2206 bytes
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.
Re: Select Case on a text-field
#215
Author: Bruce M. Thompson
Date: Mon, 24 Nov 2003 16:40
26 lines
1711 bytes
> 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
bthmpson@mvps.org (See the Access FAQ at http://www.mvps.org/access)
>> NO Email Please. Keep all communications
     within the newsgroups so that all might benefit.<<
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads