Display image on page tab on current (1 Viewer)

Kayleigh

Member
Local time
Today, 13:24
Joined
Sep 24, 2020
Messages
706
Hi I'm not sure it's possible to do this...
Would like to have an image on tab page appear conditionally when form loads.
Here is code I have for page to be visible but would like to change to always be visible but an indicator if specific fields are filled in. (Note this page contains subform)
Code:
If Not IsNothing(Me!Form!sbfrmStudentHealth.fldMedications) Or Not IsNothing(Me!Form!sbfrmStudentHealth.fldAllergies) Or Not IsNothing(Me!Form!sbfrmStudentHealth.fldNotes) Then
Me.Medical_Notes.Visible = True
Else
Me.Medical_Notes.Visible = False
End If
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:24
Joined
Oct 29, 2018
Messages
21,358
Try using IsNull() instead of IsNothing().
 

Kayleigh

Member
Local time
Today, 13:24
Joined
Sep 24, 2020
Messages
706
Changed. Not working yet...
Code:
If (Me.fldMedicalCondition = True) Or (Not IsNull(Me!sbfrmStudentHealth.Form!fldMedications) Or (Me!sbfrmStudentHealth.Form!sbfrmStudentHealth.fldAllergies) Or (Me!sbfrmStudentHealth.Form!sbfrmStudentHealth.fldMedNotes)) Then Me.StudentTabs.Pages("Medical Notes").Visible = True
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:24
Joined
Oct 29, 2018
Messages
21,358
Changed. Not working yet...
Code:
If (Me.fldMedicalCondition = True) Or (Not IsNull(Me!sbfrmStudentHealth.Form!fldMedications) Or (Me!sbfrmStudentHealth.Form!sbfrmStudentHealth.fldAllergies) Or (Me!sbfrmStudentHealth.Form!sbfrmStudentHealth.fldMedNotes)) Then Me.StudentTabs.Pages("Medical Notes").Visible = True
Can you post a sample copy of your db?
 

Kayleigh

Member
Local time
Today, 13:24
Joined
Sep 24, 2020
Messages
706
Here you go
 

Attachments

  • studentsTest.accdb
    776 KB · Views: 477

Users who are viewing this thread

Top Bottom