Change command button picture to text then back to picture

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top