Visible Problem

S

scott04

Hi everyone,
I am trying to make two textboxes visible only if data is present. My code
works fine if the first record loaded meets my criteria. My problem is if i
go to the next record and then come back the record the data that should be
visible does not appear. I have placed the code in the oncurrent event and
have tried placing it in other places but have not had much luck. My code is:
If IsNull(Me.Auditor2nd) = True Then
Me.Auditor2nd.Visible = False
End If
If IsNull(Me.Auditor3rd) = True Then
Me.Auditor3rd.Visible = False
End If

Any suggestions?
 
S

scott04

Thanks Damon...worked perfectly

Damon Heron said:
Try:
If IsNull(Me.Auditor2nd)Then
Me.Auditor2nd.Visible = False
Else
Me.Auditor2nd.Visible =True
End If

Damon
 
J

John W. Vinson

Try:
If IsNull(Me.Auditor2nd)Then
Me.Auditor2nd.Visible = False
Else
Me.Auditor2nd.Visible =True
End If

Damon

Or more simply (if rather less obvious):

Me.Auditor2nd.Visible = IsNull(Me.Auditor2nd)
 
L

Lord Kelvan

Hi everyone,
I am trying to make two textboxes visible only if data is present.  My code
works fine if the first record loaded meets my criteria.  My problem isif i
go to the next record and then come back the record the data that should be
visible does not appear.  I have placed the code in the oncurrent eventand
have tried placing it in other places but have not had much luck.  My code is:
If IsNull(Me.Auditor2nd) = True Then
Me.Auditor2nd.Visible = False
End If
If IsNull(Me.Auditor3rd) = True Then
Me.Auditor3rd.Visible = False
End If

Any suggestions?

because you need the alternative statement

If IsNull(Me.Auditor2nd) = True Then
Me.Auditor2nd.Visible = False
else
Me.Auditor2nd.Visible = true
End If

If IsNull(Me.Auditor3rd) = True Then
Me.Auditor3rd.Visible = False
else
Me.Auditor3rd.Visible = True
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top