Connecting Tech Pros Worldwide Forums | Help | Site Map

hiding label and text control if the value is null in form view

Newbie
 
Join Date: May 2007
Posts: 2
#1: May 28 '07
Sir,
I'm using Ms Access 2000 for crearting a database based on the information extracted from government reports. My aim is to preapare an information retrieval system.
For this purpose, I have created a table named as 'Index Entries'. The field, named as 'Legislature' of this table has got null values for some records. I want to hide the text box for this field having null values in form views of that particular records.
Kindly guide me to solve this.

Thinking You,

Sephali

nico5038's Avatar
Moderator
 
Join Date: Nov 2006
Location: The Netherlands
Posts: 2,232
#2: May 28 '07

re: hiding label and text control if the value is null in form view


Use in the OnCurrent event code for the form:

Expand|Select|Wrap|Line Numbers
  1. IF IsNull(Me!Legislature) then
  2.     me!Legislature.visible = False
  3. else
  4.     me!Legislature.visible = True
  5. end if
  6.  
Nic;o)
Reply


Similar Microsoft Access / VBA bytes