Can't get 2007 to work for me
I barely know enough about Microsoft Access to get by and I created a program for work that keeps track of inventory and uses a visual basic code to pull up pictures in forms. This has always worked great on Access 2003 but since we upgraded to 2007 this no longer works. If anyone could please tell me what I need to do to this code to get it to work in 2007 I would greatly appreciate it.
Option Compare Database
Private Sub Form_Current()
On Error Go to err_Form_Current
If Not Me!txtPicture = "" Or Not IsNull(Me!txtPicture) Then
Me!Picture.Picture = GetPathPart & Me!txtPicture
Else
Me!Picture.Picture = ""
End If
If Not Me!txtPicture2 = "" Or Not IsNull(Me!txtPicture2) Then
Me!Picture2.Picture = GetPathPart & Me!txtPicture2
Else
Me!Picture2.Picture = ""
End If
If Not Me!txtPicture3 = "" Or Not IsNull(Me!txtPicture3) Then
Me!Picture3.Picture = GetPathPart & Me!txtPicture3
Else
Me!Picture3.Picture = ""
End If
exit_Form_Current:
Exit Sub
err_Form_Current:
MsgBox Err.Description
Resume exit_Form_Current
End Sub
Private Sub Form_Open(Cancel As Integer)
On Error GoTo Err_Form_Open
If IsNull(Me!txtPicture) Or Me!txtPicture = "" Then
' do nothing
Else
Me!Picture.Picture = GetPathPart & Me!txtPicture
End If
If IsNull(Me!txtPicture2) Or Me!txtPicture2 = "" Then
' do nothing
Else
Me!Picture2.Picture = GetPathPart & Me!txtPicture2
End If
If IsNull(Me!txtPicture3) Or Me!txtPicture3 = "" Then
' do nothing
Else
Me!Picture3.Picture = GetPathPart & Me!txtPicture3
End If
Exit_Form_Open:
Exit Sub
Err_Form_Open:
MsgBox Err.Description
Resume Exit_Form_Open
End Sub