charles
Posts: 59
|
Posted: 12/01/2008, 2:53 AM |
|
Hi '
Is there a diffrence between hiding a listbox and a textbox?
I am trying to programmatically hide a listbox in a record form based on the recordcount property of a grid.
I just found that the hiding part of my code is not working. I have sucessfully used this code before for textboxes without any problem.
Here is the code
if gridformname.recordset.recordcount<>0 then
recordformname.listbox.visible=false
End if
Unfortunately this code does not hide the listbox.
Can somebody please help me out?
Alternatively,how can i automatically disable the listbox based on the recordcount property of the gridform.
regards,
charles
|
|
|
kevind
Posts: 251
|
Posted: 12/02/2008, 6:14 AM |
|
use a panel instead - switch to HTML view of the page and locate the listbox control in the form you are trying to hide - then place the cursor on a blank line above and click the panel icon from the toolbox
put your cursor between the panel start and panel end comment tags and press enter to make some space
then highlight all of the code for the listbox and drag and drop it into the space between the panel tags
for controlling visibility you can add a before show action event to decide whether to show the panel - i normally make my panels not visible and then decide whether to show them based on record counts etc.
hope that helps
Kevin
_________________
thanks
Kevin
======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
|
|
|
|