Questions!

  • Thread starter Thread starter Michelle
  • Start date Start date
M

Michelle

Is there anyone there? I have posted this last friday and
I still don't have an answer.

Here is my request. I have a form with a drop down menu
of 4 items. I am trying to write a formula (not code) for
the following action:

=IIF[Classification]="Protected B", [Name]= (Colour of
font will be white). I don't seem to be able to make it
work. I am always missing something.

What I really want is that some field would look like
empty if the classification is Protected B.

Can anyone help me on that formula^

Thanks a bunch

..
 
Hi, Michelle. If I understand you correctly, you want to
make a textbox control invisible if a certain value is
selected from a combo box. Is that correct? If so, the
easiest way to do it is a simple AfterUpdate procedure.
It's not difficult.

In form design mode, right click your combobox, and select
Properties. Click the Event tab, click in the AfterUpdate
event, select the button to the right (...), and choose
Code Builder.

Access will create the shell of the procedure for you.
All you need to add is:

If Me![yourcomboboxname] = "Protected B"
Then Me![yourothercontrolname].Visible = False
Else Me![yourothercontrolname].Visible = True
End If

I suggest you rename your field and the control to which
it's bound to something other than "Name", which is an
Access reserved word. Using reserved words can cause
difficult to diagnose behavior.

HTH
Kevin Sprinkel
 
Reading Lynn's post made me wonder again about your
intent. If you wish to change the value of [Name] to
Null, Lynn's solution is simple to implement.

If you, however, want to preserve the value of [Name], and
simply not display it, then my previous post will do that.

If you have any questions, please post.

HTH
Kevin Sprinkel
 
Kevin,
My solution doesn't actually change the value of [Name]. Rather, it displays
nothing in the textbox if the suggested criteria is met. Otherwise, it
displays the value of [Name].
 
Oops; misread your formula, Lynn. Thanks. That's what
you get when you work on building a new deck until 11 pm
every night after working all day!

Kevin Sprinkel
-----Original Message-----
Kevin,
My solution doesn't actually change the value of [Name]. Rather, it displays
nothing in the textbox if the suggested criteria is met. Otherwise, it
displays the value of [Name].

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Reading Lynn's post made me wonder again about your
intent. If you wish to change the value of [Name] to
Null, Lynn's solution is simple to implement.

If you, however, want to preserve the value of [Name], and
simply not display it, then my previous post will do that.

If you have any questions, please post.

HTH
Kevin Sprinkel


.
 
Oops; misread your formula, Lynn. Thanks. That's what
you get when you work on building a new deck until 11 pm
every night after working all day!

NP. Wanna come build my new deck for me?
 
Allo Kevin,

Thank you for answering me. I have done as you said but I
get a message like this: Compile Error: Expected Then or
Go To.

I can see that Then is incorporated in the code but
because I am a rookie in code, I have difficulty
understanding it. Note: That I am very eager to learn,
but I also understand that you are busy. A bit help is
always greatly appreciated.

Michelle
-----Original Message-----
Hi, Michelle. If I understand you correctly, you want to
make a textbox control invisible if a certain value is
selected from a combo box. Is that correct? If so, the
easiest way to do it is a simple AfterUpdate procedure.
It's not difficult.

In form design mode, right click your combobox, and select
Properties. Click the Event tab, click in the AfterUpdate
event, select the button to the right (...), and choose
Code Builder.

Access will create the shell of the procedure for you.
All you need to add is:

If Me![yourcomboboxname] = "Protected B"
Then Me![yourothercontrolname].Visible = False
Else Me![yourothercontrolname].Visible = True
End If

I suggest you rename your field and the control to which
it's bound to something other than "Name", which is an
Access reserved word. Using reserved words can cause
difficult to diagnose behavior.

HTH
Kevin Sprinkel
-----Original Message-----
Is there anyone there? I have posted this last friday and
I still don't have an answer.

Here is my request. I have a form with a drop down menu
of 4 items. I am trying to write a formula (not code) for
the following action:

=IIF[Classification]="Protected B", [Name]= (Colour of
font will be white). I don't seem to be able to make it
work. I am always missing something.

What I really want is that some field would look like
empty if the classification is Protected B.

Can anyone help me on that formula^

Thanks a bunch

..


.
.
 
Allo Lynn,

I have tried your formula, but it does not work. I would
love it to work this way, because this is more my kind of
thing. Formulas.

Michelle
-----Original Message-----
Try this:

=IIF ([Classification] = "Protected B", Null, [Name])

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


Is there anyone there? I have posted this last friday and
I still don't have an answer.

Here is my request. I have a form with a drop down menu
of 4 items. I am trying to write a formula (not code) for
the following action:

=IIF[Classification]="Protected B", [Name]= (Colour of
font will be white). I don't seem to be able to make it
work. I am always missing something.

What I really want is that some field would look like
empty if the classification is Protected B.

Can anyone help me on that formula^

Thanks a bunch

.


.
 
Back
Top