If you want to display image on mouse over on "Command Button " in access form.
Step 1 . Open the form in design mode
Step 2. Add a label to it and keep the caption blank( Note Label size should be bigger than Command button and command button should be added/moved on label . Snapshot below)
Step 3 Add a command button above the label and image which you want to display.
Check the snapshot below in design mode-
Add below code to form on which you have added all the label.button and image.
Option Compare Database
Private Sub Command0_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Image1.Visible = True Then Exit Sub
Image1.Visible = True
End Sub
Private Sub Form_Load()
Image1.Visible = False
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Visible = False
End Sub
Step 1 . Open the form in design mode
Step 2. Add a label to it and keep the caption blank( Note Label size should be bigger than Command button and command button should be added/moved on label . Snapshot below)
Step 3 Add a command button above the label and image which you want to display.
Check the snapshot below in design mode-
Add below code to form on which you have added all the label.button and image.
Option Compare Database
Private Sub Command0_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Image1.Visible = True Then Exit Sub
Image1.Visible = True
End Sub
Private Sub Form_Load()
Image1.Visible = False
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1.Visible = False
End Sub
In excel
ReplyDeletehttp://www.excelvbamacros.com/2012/03/display-image-on-mouseover.html