我正在研究在Access 2000中创建的MS访问数据库,现在我将其转换为Access 2007.除了(位图)图像更改功能外,每件事情都正常。基于相同的条件,我需要更改命令按钮的图像
If Me.Command127.Picture = Me.cmdLockImage.Picture Then
Me.Command127.Picture = Me.cmdUnlockImage.Picture
Else
Me.Command127.Picture = Me.cmdLockImage.Picture
End If
Run-Time error 2220, Can't open the file (bitmap).
请建议。
答案 0 :(得分:1)
在标准模块中声明公共变量
Dim blnCmd127 As Boolean
现在页面代码
If blnCmd127 = False Then
Me.Command127.PictureData = Me.cmdUnlockImage.PictureData
blnCmd127 = True
Else
Me.Command127.PictureData = Me.cmdLockImage.PictureData
blnCmd127 = False
End If