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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display image if text box is empty

Status
Not open for further replies.

ianbar

Technical User
Jan 10, 2003
69
GB
Hi,

I have two images and would like one displayed depending on whether the textbox 'customer_name' is empty and the other image if the text box has data in, what's the vb code for this????

Thanks.
 
In the OnCurrent Event for the Form itself, place:

If IsNull(Me![name of textbox]) Then
Me![name of picture to display when empty].Visible = True
Me![name of picture not to display].Visible = False
Else
Me![name of picture to display when empty].Visible = False
Me![name of picture not to display].Visible = True
End If

Then set both images to Visible = No on the form. You should be set.

****************************
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top