Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two diffferent items in On Current, but How? 1

Status
Not open for further replies.

KayJen

Technical User
Oct 22, 2001
36
US
I have a form that I am using and in the On Current Event I have it looking for and loading any photographs as the example shows below. I'm also trying to make a command button visible if a certain criteria is met. Is it possible to load more than one event in the On Current portion. Any help is greatly appreciated.

Private Sub Form_Current()
On Error GoTo Err_Form_Current

If Not Me!txtPicture = "" Or Not IsNull(Me!txtPicture) Then
Me!Picture.Picture = Me!txtPicture
Else
Me!Picture.Picture = ""
End If

Exit_Form_Current:
Exit Sub

Err_Form_Current:
MsgBox Err.Description
Resume Exit_Form_Current

End Sub

Data that I am trying to load:

If me.Text482 > 0 Then
Me.OPF.Visible = True
Else
If me.Text482 < 1 Then
Me.OPF.Visible = False
End If
End If

Thanks,
Sonny
 
Hi

Yes just add the additional if statement

Private Sub Form_Current()
On Error GoTo Err_Form_Current

If Not Me!txtPicture = &quot;&quot; Or Not IsNull(Me!txtPicture) Then
Me!Picture.Picture = Me!txtPicture
Else
Me!Picture.Picture = &quot;&quot;
End If
'
If me.Text482 > 0 Then
Me.OPF.Visible = True
Else
If me.Text482 < 1 Then
Me.OPF.Visible = False
End If
End If
...etc as now


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top