Change command button picture to text then back to picture

A

Adam Thwaites

I haev a command button that I only want to be clicked a maximum of once a
minute. To start with it has a picture MS Access Report 2. Once clicked it
changes to display 60 counting down to 0, and it also disabled. On 0 I want
to change it back to displaying the image but Access doesn't see to have this
function.

Any ideas?
 
J

Jon Lewis

A command button has a PictureData property from which you can copy the data
into a byte array from which you can restore your image later in the
procedure so try something like:

Dim bArray() As Byte
ReDim bArray(LenB(Me.cmd1.PictureData) - 1)
bArray = Me.cmd1.PictureData

'Do your countdown

Me.cmd1.PictureData = bArray

HTH
 
Top