为什么我做的窗体连接不到图片种显示这一张图片。有那为高手指点一下。
代码如下:
Option Compare Database
Private Sub Image10_Click()
On Error GoTo R
款号.SetFocus
strPic = 款号.Text
Dbpath = Application.CurrentProject.Path
If Dbpath = "\\12345\Dbase\图片" Then
imgItem.Picture = "\\12345\Dbase\图片\Picture\" & Left(strPic, 3) & "\" & strPic & ".gif"
Else
imgItem.Picture = [url=file://\\123456\Dbase\图片\Picture\]\\123456\Dbase\图片\Picture\[/url] & Left(strPic, 3) & "\" & strPic & ".gif"
'imgItem.Picture = "D:\我的图片\图片\Picture\其他\" & strPic & ".gif"
End If
R:
Select Case Err.Number
Case Is = "2220"
imgItem.Picture = ""
Resume Next
Case Else
Resume Next
End Select
End Sub