|
2#
楼主 |
发表于 2004-8-10 00:37:00
|
只看该作者
help帮改下这段代码!
问题解决了! Me.image.picture = ""
Dim myfile, mypath1, mypath2, mypath3 As String
mypath1 = "\\sm-server\g\our photo\smartrend\"
mypath2 = "\\sm-server\g\our photo\wax-silver model\新款号-photo\"
mypath3 = "\\sm-server\g\our photo\smartrend\ring\"
If Left([Style], 3) = "uba" Then
If Dir(mypath1 & "bangle\" & Me.Style & "*.jpg ") = "" Then '尝试采用模糊方法打开图片
If Dir(mypath2 & Me.Style & "*.jpg") <> "" Then
myfile = Dir(mypath2 & Me.Style & "*.jpg")
image.picture = mypath2 & myfile
Else
image.picture = ""
End If
Else
myfile = Dir(mypath1 & "bangle\" & Me.Style & "*.jpg ")
image.picture = mypath1 & "bangle\" & myfile
End If
ElseIf Left([Style], 2) = "ub" Then
If Dir(mypath1 & "bracelet\" & Me.Style & "*.jpg ") = "" Then
If Dir(mypath2 & Me.Style & "*.jpg") <> "" Then
myfile = Dir(mypath2 & Me.Style & "*.jpg")
image.picture = mypath2 & myfile
Else
image.picture = ""
End If
Else
myfile = Dir(mypath1 & "bracelet\" & Me.Style & "*.jpg ")
image.picture = mypath1 & "bracelet\" & myfile
End If end if |
|