Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show/hide item per record

Status
Not open for further replies.

dixxy12

Technical User
Jun 18, 2007
45
CA
Hi everyone,

I am trying to have a command button visible or not visible on a continuous form base on the value of a text box.

So for instance,
Code:
if txtQTSBO.Value > 0 then
  cmdBO.visible = false
    else
  cmdBO.visible = true
end if
the problem i am having is is either shows for all records or does not show at all...i would like it to show for individuals recoreds based on that text box value.

How could i acheive this?

Thanks

Sylvain
 
This is standard behaviour for unbound controls in the detail section of a continuous form.
You may place the command button in the header or footer section of the form and put the following code in the Current event procedure of the form and the AfterUpdate event procedure of txtQTSBO.
Code:
Me!cmdBO.Visible = (Me!txtQTSBO.Value <= 0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
How are ya dixxy12 . . .

You can also [blue]simulate a command button[/blue] with an unbound textbox and [blue]use Conditional Formatting![/blue]


Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
thanks guys...used a mixed of both to make it work...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top