Show Text Box IIF

  • Thread starter Thread starter Dorothy
  • Start date Start date
D

Dorothy

In a form I have a field "AmountRequested" and a text box
that displays the AmountRequested minus 10%. I would like
this text box to appear only if the AmountRequested is >
$1000. Do I need code in the On Enter, On Exit... How do
I go about doing this?
 
In a form I have a field "AmountRequested" and a text box
that displays the AmountRequested minus 10%. I would like
this text box to appear only if the AmountRequested is >
$1000. Do I need code in the On Enter, On Exit... How do
I go about doing this?

Code the [AmountRequested] control's AfterUpdate event:

Me![OtherControlName].Visible = Me![AmountRequested]>1000
 
Thanks Fred, this is the code as you suggested, but it did
not work. Is there something wrong with it?

Private Sub Amt_Req_AfterUpdate()
Me![Amt10].Visible = Me![Amt Req] > 1000

End Sub
-----Original Message-----
In a form I have a field "AmountRequested" and a text box
that displays the AmountRequested minus 10%. I would like
this text box to appear only if the AmountRequested is
$1000. Do I need code in the On Enter, On Exit... How do
I go about doing this?

Code the [AmountRequested] control's AfterUpdate event:

Me![OtherControlName].Visible = Me![AmountRequested]>1000
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
Thanks Fred, this is the code as you suggested, but it did
not work. Is there something wrong with it?

Private Sub Amt_Req_AfterUpdate()
Me![Amt10].Visible = Me![Amt Req] > 1000

End Sub
-----Original Message-----
In a form I have a field "AmountRequested" and a text box
that displays the AmountRequested minus 10%. I would like
this text box to appear only if the AmountRequested is
$1000. Do I need code in the On Enter, On Exit... How do
I go about doing this?

Code the [AmountRequested] control's AfterUpdate event:

Me![OtherControlName].Visible = Me![AmountRequested]>1000
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Questons...
1) Is this done on a Single View form (can do) or on a Continuous Form
(can not do)?

2) Is the [AmountRequested] field the field which is getting the 1000
data entered into by a user? If so, it should work.
If not, then the AfterUpdate event doesn't fire and it won't work.

Place the code in whichever control the 1000 is being entered into, as
long as the form is NOT a continuous view form.
 
-----Original Message-----
Thanks Fred, this is the code as you suggested, but it did
not work. Is there something wrong with it?

Private Sub Amt_Req_AfterUpdate()
Me![Amt10].Visible = Me![Amt Req] > 1000

End Sub
-----Original Message-----
On Mon, 7 Jun 2004 12:32:19 -0700, Dorothy wrote:

In a form I have a field "AmountRequested" and a text box
that displays the AmountRequested minus 10%. I would like
this text box to appear only if the AmountRequested is

$1000. Do I need code in the On Enter, On Exit...
How
do
I go about doing this?

Code the [AmountRequested] control's AfterUpdate event:

Me![OtherControlName].Visible = Me![AmountRequested] 1000
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Questons...
1) Is this done on a Single View form (can do) or on a Continuous Form
(can not do)?

2) Is the [AmountRequested] field the field which is getting the 1000
data entered into by a user? If so, it should work.
If not, then the AfterUpdate event doesn't fire and it won't work.

Place the code in whichever control the 1000 is being entered into, as
long as the form is NOT a continuous view form.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
It is a single form view and the code was placed in the
field where 1000 would be entered. Still doesn't work.
Thanks for your help. If you think of anything Fred,
please let me know.
 
-----Original Message-----
Thanks Fred, this is the code as you suggested, but it did
not work. Is there something wrong with it?

Private Sub Amt_Req_AfterUpdate()
Me![Amt10].Visible = Me![Amt Req] > 1000

End Sub
-----Original Message-----
On Mon, 7 Jun 2004 12:32:19 -0700, Dorothy wrote:

In a form I have a field "AmountRequested" and a text box
that displays the AmountRequested minus 10%. I would like
this text box to appear only if the AmountRequested is

$1000. Do I need code in the On Enter, On Exit...
How
do
I go about doing this?

Code the [AmountRequested] control's AfterUpdate event:

Me![OtherControlName].Visible = Me![AmountRequested] 1000
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Questons...
1) Is this done on a Single View form (can do) or on a Continuous Form
(can not do)?

2) Is the [AmountRequested] field the field which is getting the 1000
data entered into by a user? If so, it should work.
If not, then the AfterUpdate event doesn't fire and it won't work.

Place the code in whichever control the 1000 is being entered into, as
long as the form is NOT a continuous view form.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
Fred, I did get this to work. Now one more question.
When I close the form and open it again. The box that I
don't want to show does. It only disappears if you enter
a new record and the amount you enter is <1000. But for
previously entered records the box is there regardless of
the amount. How can I get it so this box only shows when
<1000? Sorry to be a bug. But I really do appreciate
your help.
 
-----Original Message-----
Thanks Fred, this is the code as you suggested, but it did
not work. Is there something wrong with it?

Private Sub Amt_Req_AfterUpdate()
Me![Amt10].Visible = Me![Amt Req] > 1000

End Sub

-----Original Message-----
On Mon, 7 Jun 2004 12:32:19 -0700, Dorothy wrote:

In a form I have a field "AmountRequested" and a text
box
that displays the AmountRequested minus 10%. I would
like
this text box to appear only if the AmountRequested is

$1000. Do I need code in the On Enter, On Exit... How
do
I go about doing this?

Code the [AmountRequested] control's AfterUpdate event:

Me![OtherControlName].Visible = Me![AmountRequested] 1000
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Questons...
1) Is this done on a Single View form (can do) or on a Continuous Form
(can not do)?

2) Is the [AmountRequested] field the field which is getting the 1000
data entered into by a user? If so, it should work.
If not, then the AfterUpdate event doesn't fire and it won't work.

Place the code in whichever control the 1000 is being entered into, as
long as the form is NOT a continuous view form.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
Fred, I did get this to work. Now one more question.
When I close the form and open it again. The box that I
don't want to show does. It only disappears if you enter
a new record and the amount you enter is <1000. But for
previously entered records the box is there regardless of
the amount. How can I get it so this box only shows when
<1000? Sorry to be a bug. But I really do appreciate
your help.

Place the same code in the Form's Current event as well.
 
-----Original Message-----
-----Original Message-----
On Mon, 7 Jun 2004 13:17:03 -0700,

Thanks Fred, this is the code as you suggested, but
it
did
not work. Is there something wrong with it?

Private Sub Amt_Req_AfterUpdate()
Me![Amt10].Visible = Me![Amt Req] > 1000

End Sub

-----Original Message-----
On Mon, 7 Jun 2004 12:32:19 -0700, Dorothy wrote:

In a form I have a field "AmountRequested" and a text
box
that displays the AmountRequested minus 10%. I would
like
this text box to appear only if the AmountRequested is

$1000. Do I need code in the On Enter, On Exit... How
do
I go about doing this?

Code the [AmountRequested] control's AfterUpdate event:

Me![OtherControlName].Visible = Me![AmountRequested]
1000
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.


Questons...
1) Is this done on a Single View form (can do) or on a Continuous Form
(can not do)?

2) Is the [AmountRequested] field the field which is getting the 1000
data entered into by a user? If so, it should work.
If not, then the AfterUpdate event doesn't fire and it won't work.

Place the code in whichever control the 1000 is being entered into, as
long as the form is NOT a continuous view form.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
Fred, I did get this to work. Now one more question.
When I close the form and open it again. The box that I
don't want to show does. It only disappears if you enter
a new record and the amount you enter is <1000. But for
previously entered records the box is there regardless of
the amount. How can I get it so this box only shows when
<1000? Sorry to be a bug. But I really do appreciate
your help.

Place the same code in the Form's Current event as well.
Fred, That work great!. Thanks again.
 
Dorothy said:
-----Original Message-----
Thanks Fred, this is the code as you suggested, but it did
not work. Is there something wrong with it?

Private Sub Amt_Req_AfterUpdate()
Me![Amt10].Visible = Me![Amt Req] > 1000

End Sub

-----Original Message-----
On Mon, 7 Jun 2004 12:32:19 -0700, Dorothy wrote:

In a form I have a field "AmountRequested" and a text box
that displays the AmountRequested minus 10%. I would like
this text box to appear only if the AmountRequested
is
$1000. Do I need code in the On Enter, On Exit...
How
do
I go about doing this?

Code the [AmountRequested] control's AfterUpdate event:

Me![OtherControlName].Visible = Me![AmountRequested] 1000
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Questons...
1) Is this done on a Single View form (can do) or on a Continuous Form
(can not do)?

2) Is the [AmountRequested] field the field which is getting the 1000
data entered into by a user? If so, it should work.
If not, then the AfterUpdate event doesn't fire and it won't work.

Place the code in whichever control the 1000 is being entered into, as
long as the form is NOT a continuous view form.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
It is a single form view and the code was placed in the
field where 1000 would be entered. Still doesn't work.
Thanks for your help. If you think of anything Fred,
please let me know.

Dorothy-

This should work. Place this code on the AfterUpdate of the [Amount
Requested] field.

If Me![Amount Requested] > 999 Then
Me![Amount Requested Minus 10%].Visible = True
Else
Me![Amount Requested Minus 10%].Visible = False
End If

chris
 
Back
Top