exiting database problem

  • Thread starter Thread starter Andy G
  • Start date Start date
A

Andy G

I have a image on an Access form that hyperlinks to a macro (I like when
the pointer turns into a hand over the image). When I click on the image to
run the Quit Application macro it gives me an
error > "Can't Exit the database now. If you're running a
Visual Basic module that is using OLE or DDE, you may need
to interupt the module." Further another message "Can't
follow the hyperlink. Please verify the destination."

Is this a bug? If not, how do I get around this?

Thanks.
 
First command in OnClick should be to end the sub or function that opened
the linked OLE (the pointer)
hth,
SusanV
 
This image has a hyperlink subaddress = Macro LogOff.

The Macro LogOff runs the below function...

Function LogOff()
confirm = MsgBox("You are about to exit the REMAP system.", vbOKCancel +
vbInformation, Forms!frmGlobal!txtSysName)
If confirm = vbOK Then
DoCmd.Quit acQuitSaveAll
End If
End Function

What sub or function would I end on the OnClick of that image?

Thanks.
 
Back
Top