I am trying to change from using three labels on my form to one label.
1. If this is a new record, the label will say “Add Attachment (y/n)?” and the text box will have a Default Value = Y.
2. If not a new record and Activity ID is not equaled to 1, 2, or 23 then the label will say “Add Attachment (y/n)?” and the text box will have a Default Value = Y.
3. Else if ActivityID = 2 then the label will say "Click icon to vie&w Attachment." And, an icon will display next to it.
4. Else if ActivityID = 1 or 23 then the label will "Click icon to view &Contract Listings." And, another kind of icon will display next to it.
Sometimes the label and icon changes and sometimes they don’t. Below is my code:
Help!!!
1. If this is a new record, the label will say “Add Attachment (y/n)?” and the text box will have a Default Value = Y.
2. If not a new record and Activity ID is not equaled to 1, 2, or 23 then the label will say “Add Attachment (y/n)?” and the text box will have a Default Value = Y.
3. Else if ActivityID = 2 then the label will say "Click icon to vie&w Attachment." And, an icon will display next to it.
4. Else if ActivityID = 1 or 23 then the label will "Click icon to view &Contract Listings." And, another kind of icon will display next to it.
Sometimes the label and icon changes and sometimes they don’t. Below is my code:
Code:
If Me.NewRecord Then
Me.lblImage.Caption = "Add Attachment (y/n)? "
Me.cmdImage.Visible = False
Me.txtYesNo.Visible = True
Me.txtYesNo.Left = 2438
Me.txtYesNo.Value = "N"
ElseIf Not Me.NewRecord And Me.ActivityID <> 2 Or Me.ActivityID <> 23 Or Me.ActivityID <> 1 Then
Me.lblImage.Caption = "Add Attachment (y/n)? "
Me.cmdImage.Visible = False
Me.txtYesNo.Visible = True
Me.txtYesNo.Left = 2438
Me.txtYesNo.Value = "N"
ElseIf Me.ActivityID = 2 Then
Me.lblImage.Caption = "Click icon to vie&w Attachment."
Me.cmdImage.Visible = True
Me.cmdImage.Picture = "C:\Users\LMCC\Pictures\Attachment--smaller.bmp"
Me.txtYesNo.Visible = False
Else
If Me.ActivityID = 23 Or Me.ActivityID = 1 Then
Me.lblImage.Caption = "Click icon to view &Contract Listings."
Me.cmdImage.Visible = True
Me.cmdImage.Picture = "C:\Users\LMCC\Pictures\paperclip -- tiny.bmp"
Me.txtYesNo.Visible = False
End If
End If
Help!!!