Picture appear from a text box

Pinkoto

Registered User.
Local time
Today, 11:24
Joined
Jun 25, 2014
Messages
73
hello
how can i make a picture appear when I've entered data in a text box. I tried the code for a check box but it didn't work.

Me.Image190.Visible = Nz(Me.checkbox, False)
 
It's going to be different because a TEXT box is not a True/False scenario. So, we could try...

Code:
Me.YourTextBox <> "" Then
   Me.Image190.Visible = True
Else
   Me.Image190.Visible = False
End if
Note, this will not work on a Continuous Form.
 
should i write it in the form_current, where i have written the codes for the check boxes?
should i write something between <> "" ?
I wrote it in the form current and it gives me syntax error and it shows me this text from the code in yellow
Me.YourTextBox <> "" Then
 
Where it says YourTextBox you need to put the name of your text box. And it should go in the On_Current event but you might also need it in the After_Update event of the text box.
 
yes, I've written the name of the text box where i have to and i have put the code on current but it still gives me an error.
Private Sub Form_Current()
Me.oscarPic.Visible = Nz(Me.bestpictureoscer, False)
Me.oscarmonkey.Visible = Nz(Me.dropbox, False)
Me.Image189.Visible = Nz(Me.oscar1, False)
Me.Image190.Visible = Nz(Me.oscar2, False)
Me.textoscar <> "" Then
Me.Image191.Visible = True
Else
Me.Image19.Visible = False
End If
End Sub
 
Which line gives you the error? Or is it the part I gave you?
 
this gives me the error :

Me.textoscar <> "" Then

Why do i need <> "" ? do i have to put something there?
 
Oops, I forgot the If(), change that to...

Code:
If Me.textoscar <> "" Then
 

Users who are viewing this thread

Back
Top Bottom