dbTalk Databases Forums  

MSGBOX help

comp.database.ms-access comp.database.ms-access


Discuss MSGBOX help in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark
 
Posts: n/a

Default MSGBOX help - 05-06-2004 , 06:00 PM






How do I close a message box from code? here is my current code:

Option Compare Database
Dim Response As Integer

Public Function Login_Canceled()
MsgBox "Are you sure you would like to cancel?", vbYesNo +
vbApplicationModal + vbInformation + vbDefaultButton2, "Program
Message"
If Response = Yes Then Quit
If Response = No Then End
End Function


Can anyone help me?

Thanks,
Mark S.

Reply With Quote
  #2  
Old   
Ray
 
Posts: n/a

Default Re: MSGBOX help - 05-07-2004 , 06:04 AM






markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>...
Quote:
How do I close a message box from code? here is my current code:

Option Compare Database
Dim Response As Integer

Public Function Login_Canceled()
MsgBox "Are you sure you would like to cancel?", vbYesNo +
vbApplicationModal + vbInformation + vbDefaultButton2, "Program
Message"
If Response = Yes Then Quit
If Response = No Then End
End Function


Can anyone help me?

Thanks,
Mark S.
Hello Mark,

Perhaps you could change your Yes to vbYes and
your No to vbNo.

Regards,

Ray


Reply With Quote
  #3  
Old   
Mark
 
Posts: n/a

Default Re: MSGBOX help - 05-07-2004 , 04:27 PM



I've also been wondering how do i open a hyperlinked field from code?
Thanks for the help!

raycait (AT) excite (DOT) com (Ray) wrote in message news:<20ba9f4a.0405070304.4ef7f6cc (AT) posting (DOT) google.com>...
Quote:
markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>...
How do I close a message box from code? here is my current code:

Option Compare Database
Dim Response As Integer

Public Function Login_Canceled()
MsgBox "Are you sure you would like to cancel?", vbYesNo +
vbApplicationModal + vbInformation + vbDefaultButton2, "Program
Message"
If Response = Yes Then Quit
If Response = No Then End
End Function


Can anyone help me?

Thanks,
Mark S.

Hello Mark,

Perhaps you could change your Yes to vbYes and
your No to vbNo.

Regards,

Ray

Reply With Quote
  #4  
Old   
Mark
 
Posts: n/a

Default Re: MSGBOX help - 05-07-2004 , 04:56 PM



I changed my code from what it was before to this:

Option Compare Database
Private intLogonAttempts As Integer
Dim Response As Integer

Public Function Login_Canceled()
MsgBox "Are you sure you would like to cancel?", vbOKCancel +
vbApplicationModal + vbQuestion + vbDefaultButton2, "Program Message"
If Response = OK Then Quit
End Function

But it doesn't work. Can u help me? Even if I click 'Cancel' it exits.

raycait (AT) excite (DOT) com (Ray) wrote in message news:<20ba9f4a.0405070304.4ef7f6cc (AT) posting (DOT) google.com>...
Quote:
markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>...
How do I close a message box from code? here is my current code:

Option Compare Database
Dim Response As Integer

Public Function Login_Canceled()
MsgBox "Are you sure you would like to cancel?", vbYesNo +
vbApplicationModal + vbInformation + vbDefaultButton2, "Program
Message"
If Response = Yes Then Quit
If Response = No Then End
End Function


Can anyone help me?

Thanks,
Mark S.

Hello Mark,

Perhaps you could change your Yes to vbYes and
your No to vbNo.

Regards,

Ray

Reply With Quote
  #5  
Old   
Ray
 
Posts: n/a

Default Re: MSGBOX help - 05-10-2004 , 06:26 AM



markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>...
Quote:
How do I close a message box from code? here is my current code:

Option Compare Database
Dim Response As Integer

Public Function Login_Canceled()
MsgBox "Are you sure you would like to cancel?", vbYesNo +
vbApplicationModal + vbInformation + vbDefaultButton2, "Program
Message"
If Response = Yes Then Quit
If Response = No Then End
End Function


Can anyone help me?

Thanks,
Mark S.
Hello again.

As for your first question, I'm not sure. I'll have to look
into it. The one question I do have is, why do you need code
to run the hyperlink as compared to just selecting it with
the mouse when that field data is displayed?

Concerning the second question:

Perhaps you need to add a bit more code.

If Response = vbYes Then
DoCmd.Quit
Else
Exit Sub
End If


Hope this directs you in the right way.

Regards,

Ray


Reply With Quote
  #6  
Old   
Mark
 
Posts: n/a

Default Re: MSGBOX help - 05-10-2004 , 06:51 PM



I meant to say that I need to know how to open a hyperlinked field
from a command button (in code)
Thanks!

raycait (AT) excite (DOT) com (Ray) wrote in message news:<20ba9f4a.0405100326.49e3d770 (AT) posting (DOT) google.com>...
Quote:
markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>...
How do I close a message box from code? here is my current code:

Option Compare Database
Dim Response As Integer

Public Function Login_Canceled()
MsgBox "Are you sure you would like to cancel?", vbYesNo +
vbApplicationModal + vbInformation + vbDefaultButton2, "Program
Message"
If Response = Yes Then Quit
If Response = No Then End
End Function


Can anyone help me?

Thanks,
Mark S.

Hello again.

As for your first question, I'm not sure. I'll have to look
into it. The one question I do have is, why do you need code
to run the hyperlink as compared to just selecting it with
the mouse when that field data is displayed?

Concerning the second question:

Perhaps you need to add a bit more code.

If Response = vbYes Then
DoCmd.Quit
Else
Exit Sub
End If


Hope this directs you in the right way.

Regards,

Ray

Reply With Quote
  #7  
Old   
Ray
 
Posts: n/a

Default Re: MSGBOX help - 05-11-2004 , 05:58 AM



markseym_15 (AT) hotmail (DOT) com (Mark) wrote in message news:<9187d487.0405061500.439177ab (AT) posting (DOT) google.com>...
Quote:
How do I close a message box from code? here is my current code:

Option Compare Database
Dim Response As Integer

Public Function Login_Canceled()
MsgBox "Are you sure you would like to cancel?", vbYesNo +
vbApplicationModal + vbInformation + vbDefaultButton2, "Program
Message"
If Response = Yes Then Quit
If Response = No Then End
End Function


Can anyone help me?

Thanks,
Mark S.
Hello again Mark,

To set up a hyperlink for a button, go to design view
of the form and select the button. Next, make sure
the properties window is being displayed for the
button.

Next, look for the property called "Hyperlink Address". When
you put your cursor into that propety, a build button will
appear. Select it to create a link to your document. When done,
save the form and open it. The button will display a line under
it and when you move your cursor over the button it will turn
into the hand, like when your on the internet. Just select the
button and your document will come up inside of it's source
application.

Regards,

Ray


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.