I am using the current code to make a button visible.
Private Sub Form_Current()
If Me.related = "X" Then
Me.addinfo.Visible = True
Else
Me.addinfo.Visible = False
End If
End Sub
Works fine
I need to add a second condition to make a separate field trigger the same button to appear.
me.notes.isblank = false
In other words if there is anything in the notes field I also want the button to appear.
Another scenario I might want to code is if a certain piece of text appears in the notes field, I want the button to appear.
me.notes - "specific name" then make the button visible.
I'm not sure how to fit either code piece into what is currently working.
I tried....
Private Sub Form_Current()
If Me.related = "X" or me.notes.isblank = False Then
Me.addinfo.Visible = True
Else
Me.addinfo.Visible = False
End If
End Sub
It crashed
So did
Private Sub Form_Current()
If Me.related = "X" or Me.notes.isnull = False Then
Me.addinfo.Visible = True
Else
Me.addinfo.Visible = False
End If
End Sub
I know I am close but missing something simple.