主题:感兴趣的高手,可以看一这段程序错在那里
我想在access窗体下设置一个控制按钮在利用commondialog控件在指定位置载入图片。这是我编辑的一段代码,但是总是提示“在access中打不开文件”
Private Sub ÃüÁî2_Click()
CommonDialog1.FileName = ""
CommonDialog1.Filter = "Îļþbmp|*.bmp|Îļþjpg|*.jpg|Îļþjpeg|*.jpeg"
CommonDialog1.ShowOpen
Dim a As String
a = CommonDialog1.FileTitle
If a <> "" Then
image1.Picture = LoadPicture(app.path &"\" & a)
image1.Height = 2.167
image1.Width = 2.761
End If
End Sub
Private Sub ÃüÁî2_Click()
CommonDialog1.FileName = ""
CommonDialog1.Filter = "Îļþbmp|*.bmp|Îļþjpg|*.jpg|Îļþjpeg|*.jpeg"
CommonDialog1.ShowOpen
Dim a As String
a = CommonDialog1.FileTitle
If a <> "" Then
image1.Picture = LoadPicture(app.path &"\" & a)
image1.Height = 2.167
image1.Width = 2.761
End If
End Sub