HandleFocus

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

Guest

I'm new to Access!!!

Can someone tell me how cam I put in a Form a button like those from the Webpages? I have a picture"a.gif" and when the mouse goes over this I want the picture to be changed with another "b.gif" and when clicked "c.gif", in fact, I want "b.gif" to apear over "a.gif"; something like a button with over state, and if its possible even with down state. Of course, when I click it, to open another form, but this I think I know how to do it. :

Please, help me! I have a project to finish and I'm stucked on it! :(

PS: Sorry for my English, I missed some of the English classes... :)
 
I suggest using a line of code like: Docmd.openform "MyFormName" . Enter
it as an [event procedure] on the "on got focus" property line of your
command button. MyFormName can be a dialog/popup form that displays your
graphic.
-Ed


Mario said:
I'm new to Access!!!!

Can someone tell me how cam I put in a Form a button like those from the
Webpages? I have a picture"a.gif" and when the mouse goes over this I want
the picture to be changed with another "b.gif" and when clicked "c.gif", in
fact, I want "b.gif" to apear over "a.gif"; something like a button with
over state, and if its possible even with down state. Of course, when I
click it, to open another form, but this I think I know how to do it. :)
 
I want to use more buttons, something like a website; with a menu on the top. It works what you just told me, but its not helping me because it will open a new form. All I want ot do is to show "b.gif" while the mouse is over an object ("a.gif"). I understand you told me to make a form for each state of the button....I'll have a lot of these forms then...

I found something usefull, but don't know to adapt it....

HandleFocus(1
"
Private Function HandleFocus(intBtn As Integer
' This function is called when a menu option receives the focus
' intBtn indicates which button was clicked

Dim intOption As Intege

On Error GoTo HandleMouseOver_Er

For intOption = 1 To conNumButton
'Show that this menu option has the focus..
If intOption = intBtn The
Me("Option" & intOption).Visible = Tru
Me("OptionLabel" & intOption).FontWeight = conFontWeightBol
Me("command" & intBtn).SetFocu
'... and turn off the focus on the other option
Els
Me("Option" & intOption).Visible = Fals
Me("OptionLabel" & intOption).FontWeight = conFontWeightNorma
End I
Next intOptio

HandleMouseOver_Exit
Exit Functio

HandleMouseOver_Err
MsgBox "There was an error executing the command.", vbCritica
Resume HandleMouseOver_Exi

End Functio
"
I copy it from an template project ( http://office.microsoft.com/templat...igin=CT010482871033&CategoryID=CT010482871033 ). This is the code for the buttons from the switchboard. I think it is made with Switchboard Manager. The buttons don't have a name, are notated with 1, 2, 3,.... , 8 and from the switchboard you can personalize the name of the button
 
You know I have never done this, but I think that in your case what
would do is to load all the images you want one on top of the other.
Make the first A.gif visible and the others not.

When you get a mouseover event on a.gif make it invisible and mak
b.gif visible. Then when a click event is encountered on b.gif yo
want to make it invisible and c.gif visible. Then once again on clic
open some form
 
You know I have never done this, but I think that in your case what
would do is to load all the images you want one on top of the other.
Make the first A.gif visible and the others not.

When you get a mouseover event on a.gif make it invisible and mak
b.gif visible. Then when a click event is encountered on b.gif yo
want to make it invisible and c.gif visible. Then once again on clic
open some form
 
10x for infos. But I have a litlle problem, how do I make the pictures visible and invisible
I'm new to Access and I haven't got a clue how to do it .... Any help ?
plzzzzzzzzzz .... :)
 
Back
Top