Group:  Microsoft Access ยป microsoft.public.access.gettingstarted
Thread: Using the "Switch Function"

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Using the "Switch Function"
sonfitz 03.08.2006 14:29:01
I am trying to use the switch function to recognize a value in one
field,(USER ID), and based upon that value change the value in another feild,
(text box 43). The user id feild is a drop down type feild and the switch
function does not seem to recognize the values in the drop down field. I get
an error that says (Name?) in text box 43 field.

Is there a way to get that function to recognize values in a drop down type
feild?
Re: Using the "Switch Function"
"Rick Brandt" <rickbrandt2[ at ]hotmail.com> 03.08.2006 15:54:41
sonfitz wrote:
[Quoted Text]
> I am trying to use the switch function to recognize a value in one
> field,(USER ID), and based upon that value change the value in
> another feild, (text box 43). The user id feild is a drop down type
> feild and the switch function does not seem to recognize the values
> in the drop down field. I get an error that says (Name?) in text box
> 43 field.
>
> Is there a way to get that function to recognize values in a drop
> down type feild?

What expression are you using?

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


Re: Using the "Switch Function"
John Vinson <jvinson[ at ]STOP_SPAM.WysardOfInfo.com> 03.08.2006 17:35:34
On Thu, 3 Aug 2006 07:29:01 -0700, sonfitz
<sonfitz[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>I am trying to use the switch function to recognize a value in one
>field,(USER ID), and based upon that value change the value in another feild,
>(text box 43). The user id feild is a drop down type feild and the switch
>function does not seem to recognize the values in the drop down field. I get
>an error that says (Name?) in text box 43 field.
>
>Is there a way to get that function to recognize values in a drop down type
>feild?

Two points:

- We cannot see your database, and have no way to tell what's wrong
with your Switch function since we can't see it. Coult you post the
expression?

- More important: if you can determine the value based on the UserID,
then you should almost certainly NOT be trying to store the value that
you're looking up/calculating in any other field; in fact the Switch()
function is probably not necessary, if you can create a Table to
provide the translation from userID to whatever the Switch() function
is intended to produce.

John W. Vinson[MVP]

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net