Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / September 2007

Tip: Looking for answers? Try searching our database.

Change command button picture to text then back to picture

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Adam Thwaites - 11 Sep 2007 12:12 GMT
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?
Signature

Adam Thwaites
Access Database Designer
adam.thwaites.remove@thisbit.mercedes.co.uk
Manchester, UK

Jon Lewis - 11 Sep 2007 12:20 GMT
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

>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
[quoted text clipped - 5 lines]
>
> Any ideas?
Adam Thwaites - 11 Sep 2007 14:32 GMT
Works like a charm, thanks Jon

Signature

Adam Thwaites
Access Database Designer
adam.thwaites.remove@thisbit.mercedes.co.uk
Manchester, UK

> 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
[quoted text clipped - 19 lines]
> >
> > Any ideas?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.