Message Box 01-12-10

I have a form but need it to have a pop up box with certain conditions.
Example:  The message box will only pop up if reason code =1, platform= QL 
and Carrier=QLLAZBOY
I would like the message box to pop if all of the above are true and say 
Please check elegibility on another platform.
Is this possible if so please send me in the correct direction.
thanks
0
Utf
1/12/2010 10:01:02 PM
access 16762 articles. 2 followers. Follow

3 Replies
823 Views

Similar Articles

[PageSpeed] 27

Hi LG,

This should certainly be possible. The part I'm not entirely clear about is 
this statement: "Please check elegibility on another platform". Do you want 
to disallow the combination of reason code =1, platform= QL and 
Carrier=QLLAZBOY, or simply prompt the user to check eligibility on another 
platform, but ultimately allow QL if that is what they choose?

Also, if you want to disallow this combination from now on out, you will 
probably want to run a query to first check for any existing records that 
meet all three conditions, and make appropriate changes. A Form_BeforeUpdate 
procedure should prevent adding a record with these three conditions, by 
setting Cancel = True, cancelling the update. However, that won't do anything 
for existing records that meet these conditions, unless you make some editing 
change (any change) in each record, to cause the Form_BeforeUpdate event to 
fire. You could use the Form_Current procedure to check for existing records, 
without having to make an editing change, or simply run a query to check for 
existing records first.

Option Compare Database
Option Explicit

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

   If ([reason code] = 1 And [Platform] = "QL" And [Carrier] = "QLLAZBOY") 
Then
      MsgBox "Please check elegibility on another platform.", _
              vbInformation, "Invalid Platform Code..."
      Me.Platform.SetFocus  '<---Assumption: Control name is "Platform"
      Cancel = True
   End If

ExitProc:
   Exit Sub
ProcError:
   MsgBox "Error " & Err.Number & ": " & Err.Description, _
          vbCritical, "Error in procedure Form_BeforeUpdate..."
   Resume ExitProc
End Sub


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"LG" wrote:

> I have a form but need it to have a pop up box with certain conditions.
> Example:  The message box will only pop up if reason code =1, platform= QL 
> and Carrier=QLLAZBOY
> I would like the message box to pop if all of the above are true and say 
> Please check elegibility on another platform.
> Is this possible if so please send me in the correct direction.
> thanks
0
Utf
1/13/2010 7:46:01 AM
Thank you.  I would not need to check previous records since this will be 
going forward as of Feb 1.  I just want a message box to pop up to warn them 
that they need to check if they are covered on another platform.  It does not 
necessarily mean that combination can not be entered.  Will the below still 
work?

"Tom Wickerath" wrote:

> Hi LG,
> 
> This should certainly be possible. The part I'm not entirely clear about is 
> this statement: "Please check elegibility on another platform". Do you want 
> to disallow the combination of reason code =1, platform= QL and 
> Carrier=QLLAZBOY, or simply prompt the user to check eligibility on another 
> platform, but ultimately allow QL if that is what they choose?
> 
> Also, if you want to disallow this combination from now on out, you will 
> probably want to run a query to first check for any existing records that 
> meet all three conditions, and make appropriate changes. A Form_BeforeUpdate 
> procedure should prevent adding a record with these three conditions, by 
> setting Cancel = True, cancelling the update. However, that won't do anything 
> for existing records that meet these conditions, unless you make some editing 
> change (any change) in each record, to cause the Form_BeforeUpdate event to 
> fire. You could use the Form_Current procedure to check for existing records, 
> without having to make an editing change, or simply run a query to check for 
> existing records first.
> 
> Option Compare Database
> Option Explicit
> 
> Private Sub Form_BeforeUpdate(Cancel As Integer)
> On Error GoTo ProcError
> 
>    If ([reason code] = 1 And [Platform] = "QL" And [Carrier] = "QLLAZBOY") 
> Then
>       MsgBox "Please check elegibility on another platform.", _
>               vbInformation, "Invalid Platform Code..."
>       Me.Platform.SetFocus  '<---Assumption: Control name is "Platform"
>       Cancel = True
>    End If
> 
> ExitProc:
>    Exit Sub
> ProcError:
>    MsgBox "Error " & Err.Number & ": " & Err.Description, _
>           vbCritical, "Error in procedure Form_BeforeUpdate..."
>    Resume ExitProc
> End Sub
> 
> 
> Tom Wickerath
> Microsoft Access MVP
> http://www.accessmvp.com/TWickerath/
> __________________________________________
> 
> "LG" wrote:
> 
> > I have a form but need it to have a pop up box with certain conditions.
> > Example:  The message box will only pop up if reason code =1, platform= QL 
> > and Carrier=QLLAZBOY
> > I would like the message box to pop if all of the above are true and say 
> > Please check elegibility on another platform.
> > Is this possible if so please send me in the correct direction.
> > thanks
0
Utf
1/13/2010 3:00:01 PM
Hi LG,

> Will the below still work?

Not as written, because of the line of code that reads: Cancel = True, which 
is cancelling the Update event. You can try commenting out this line of code, 
but you still may not like the effect produced. For example, if you are 
displaying navigation buttons, and the conditions are right to produce the 
message box (ie. reason code =1, platform= QL and Carrier=QLLAZBOY), a person 
could attempt to navigate to a new record. They would receive the message box 
prompt, and then the form would be displaying a different record (or a new 
record).

If you are going to allow this combination, I would change the text in the 
title property, so that it is something different than "Invalid Platform 
Code...". You've got a couple of possibilities for how to handle this 
situation:

1.) Use the Form_Current procedure.
Pro: User will receive prompt if conditions are met, even if they do not 
edit the record.
Con: Such prompts might drive your users nuts if there are a lot of records 
that would produce the message box.

2.) Use an enhanced Form_BeforeUpdate procedure
Requires additional code, and perhaps the addition of a Yes/No field to the 
underlying table. More on that, but only if you want to pursue this route.

3.) Use Conditional Formatting
This might be the most efficient method of notifying the user, by simply 
turning the font red for the Platform code, if the other conditions are met. 
Or, you could conditionally make the visible property for a label visible, to 
give them a prompt that alerts them, but doesn't force them to click an OK 
button in a message box. I think this last option is certainly the easiest to 
implement.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"LG" wrote:

Thank you.  I would not need to check previous records since this will be 
going forward as of Feb 1.  I just want a message box to pop up to warn them 
that they need to check if they are covered on another platform.  It does not 
necessarily mean that combination can not be entered.  Will the below still 
work?
__________________________________________

"Tom Wickerath" wrote:

Hi LG,

This should certainly be possible. The part I'm not entirely clear about is 
this statement: "Please check elegibility on another platform". Do you want 
to disallow the combination of reason code =1, platform= QL and 
Carrier=QLLAZBOY, or simply prompt the user to check eligibility on another 
platform, but ultimately allow QL if that is what they choose?

Also, if you want to disallow this combination from now on out, you will 
probably want to run a query to first check for any existing records that 
meet all three conditions, and make appropriate changes. A Form_BeforeUpdate 
procedure should prevent adding a record with these three conditions, by 
setting Cancel = True, cancelling the update. However, that won't do anything 
for existing records that meet these conditions, unless you make some editing 
change (any change) in each record, to cause the Form_BeforeUpdate event to 
fire. You could use the Form_Current procedure to check for existing records, 
without having to make an editing change, or simply run a query to check for 
existing records first.

Option Compare Database
Option Explicit

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo ProcError

   If ([reason code] = 1 And [Platform] = "QL" And [Carrier] = "QLLAZBOY") 
Then
      MsgBox "Please check elegibility on another platform.", _
              vbInformation, "Invalid Platform Code..."
      Me.Platform.SetFocus  '<---Assumption: Control name is "Platform"
      Cancel = True
   End If

ExitProc:
   Exit Sub
ProcError:
   MsgBox "Error " & Err.Number & ": " & Err.Description, _
          vbCritical, "Error in procedure Form_BeforeUpdate..."
   Resume ExitProc
End Sub


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"LG" wrote:

I have a form but need it to have a pop up box with certain conditions.
Example:  The message box will only pop up if reason code =1, platform= QL 
and Carrier=QLLAZBOY
I would like the message box to pop if all of the above are true and say 
Please check elegibility on another platform.
Is this possible if so please send me in the correct direction.
thanks
0
Utf
1/14/2010 7:47:02 AM
Reply:

Similar Artilces:

e-mail messages, from outlook, to cd, how to
hello there, i have a few thousant e-mail messages in outlook maps. i want to save them, i would like to burn them on a cd. i would like to move them just by one klik of my mouse i can rename them one by one, and then put them in a new map on C disk, an than burn them on a cd, but i want to do them all by just one mouse klick. please can you help me. What are Outlook Maps?? All of your mail is contained in a file with a .pst extension. You can export your folders that you want saved to a .pst file and then burn that to CD (you will need to copy it back to your hard drive and remove the r...

How do you make Inbox messages stay bold until opened?
While in the Inbox, new messages are bold. Just by "passing" by them, the bolding is removed and it appears the messages have been read. How do you make the message remain bold until the message is actually opened? Tools, options, other, Reading pane button - uncheck Mark as read when selection changes. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outlooktips.net EMO - a weekly newsletter about Outlo...

No message rules?
I just switched from Outlook express (which I really like) to Windows live mail. It did a very good job of finding my old contacts and messages, but I don't see my rules. I used to route incoming messages to specific folders based on sender or message title. I can't find the corresponding feature in Windows live mail. Am I just not looking in the right places or does Live mail just not offer the equivalent feature?? ED On the Menu Bar: Tools | Message Rules. Don't see the Menu Bar? The Alt button will temporally enable the Menu Bar, or click on the Menus ...

Reject messages with custom message?
A policy has dictated an account of a former employee respond to all incoming email messages with a custom note and not allow the messages to accumulate in the mailbox. In fact, for admin purposes it would be great if there was no longer a AD account and mailbox. Thank you, -Bob I suggest that you request a few thousand dollars to hire a programmer to write you a custom event sink so that you can comply with the policy. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" "just bob" <kilbyfan-aol@net.com> wrote in message news:%23...

Combo Box Adding Button to edit list items
I have a form which is designed to enter information about jobs we have completed. It has 3 combo boxes for different types of contacts that are pulled from different tables. I want the user to be able to select from the list or add a new contact. I know they can right click on the drop down arrow for the combo box and select "Edit List Items" but I really would like to add a button next to each combo box that gives them that option. I have tried creating a button next to it that opens up the form for the contact and then a button on that newly opened form to save and clos...

block messages
Hi all, can I block on Exch5.5 some inbound messages coming through X400 Connector. I have created Contact with internet email address (non AD user) I have tried Delivery restriction Tab to reject messages from specific mailbox (that Contact) in the internet, but it doesn't work. Is any solution, how to filter abc@abc.com on exch5.5 sp3 Thanks Marek On Wed, 22 Mar 2006 11:34:08 +0100, "Marek" <neco@necoteckaenco.com> wrote: >Hi all, >can I block on Exch5.5 some inbound messages coming through X400 Connector. >I have created Contact with internet email addr...

Outlook message rules for sent message from me.
Greetings, There has always been a message rule I wanted, and never asked about. So now I will. I default a copy of all my send messages to the sent folder. They are marked at read... which is good, because if I send the message, I obviously read it. <grin> At times, I wish I could send the message to other folders. Example. I have a folder called "family". If I send a message to "family", I'd like to be able to put a copy in the "family" folder. I know you could do this, but the message is not marked as read. Thus, the folder is bolded/...

Exchange 2003, lost messages and tracking
AD 2000 domain, single forest, single domain, single exchange site Exchange 2003 Windows 2003 Ent I have a strange problem going on here. I’ve been receiving complaints periodically about users not receiving message with xls attachments. I sent the user and myself 3 messages from a test yahoo account with sequential subjects (1,2,3…) and a .xls attachment. I received all 3 messages and attachments to my account. The user in question only received the 2nd and 3rd message with attachments. The message tracking center shows all 3 messages being delivered with the final entry being “S...

Outlook 2003 Error Message #8
When sending messages to my internal MS Exchange recipients I get this error message. "You do not have permission to send to this recipient." Any help or work around for this. I searched the MS Knowledge Base and could get this exact error to come up. Thanks. ...

Message removal
I'm attempting to remove 3 messages that keep appearing in my Sync Issues / Server Failures folder. I delete them, and the next day they are back again. I've tried extracting them with the ExMerge utility, run in Archive mode to delete them from the store. It fails, and in the ExMerge.log file it says: [11:54:12] Error copying messages from folder '\Sync Issues\Server Failures' (MAPI_W_PARTIAL_COMPLETION) Any ideas how I can extract these messages? I would try disabling any AV on the machine you are running Exmerge on and see if that works. On Mon, 21 Feb 2005 09:42:...

Signatures 01-11-10
In Outlook Express I was able to load pictures and text for my signature and then switch to Source to see the text version of my signature. Then I could copy it, paste it in Notepad and save as .txt. Then I could use Rename to change the file to .html. This could be imported as my signature and it worked. Is there a way to do something similar in Live Mail? If there is no way to do that is it possible for me to install Outlook Express in my Win7 computer and use it to do the above signature work? Then could I import that .html file as my Live Mail signature file? WLM doe...

number of messages in inbox
how to find the number of messages currently in my inbox? If you have the status bar enabled from the View menu and then highlight the folder the number of items is displayed in the status bar <anonymous@discussions.microsoft.com> wrote in message news:08ad01c3d513$e0e22dc0$a501280a@phx.gbl... > how to find the number of messages currently in my inbox? ...

OLE Server Error Message
Access 2002. I am running a database compiled with Access 2003 on a system that is using Access XP (2002). When I exit the database I get an "information" dialog that says: A problem occurred while Microsoft Access was communicating with the OLE server. Try one or more of the following: *Make sure you're connected to the network server where the OLE server application is located. *Close the OLE server and restart it outside of Microsoft Access. Then try the original operation again from within Microsoft Access. *Reinstall the OLE server to ensure that it's register...

NDR Message 5.7.1
I have a problem with message beging recieved through our exchange server. This recently started. One of our other admins did some tweaking before he went out of town and we are having a hard time finding out what was done and yes we have tried to contact him. Mail sent from exchange users come in fine but when sent from external addresses (the ones we have tested) do not come in and get a ndr message. I don't know how long this has been happening exactly but it has been a week since the other admin left. Used both DNSreports / DNSstuff and oddly both have the MX and DNS succes...

Message Tracking with Message ID
I work on the Defense Message System. We get error reports for messages with a message ID on them. The problem is how does one find the message that goes with the ID in a "FIND" of the Sent Items on the senders computer? I have not found a way that is user friendly to do this search on the users computer. Very Respectfully, ET3 Hettinger USN ...

Error message Importing INV File
I am using Money 2005 Samll Business and when I try to import a custom invoice I receive the following error message. Money cannot import an INV file that was created before July, 2002. Please try importing a more recent version of the file. I just created my file tonight and the properties say it was created 11/19/04 so there should be no problem with the date. I am set up for US regional settings. Has anyone ran into this and figured a way around it? Thanks, ...

Copy Local Message Rule
I've created a complicated message rule for filtering that I would like to put on other client machines. Can I copy it? Is this possible? WIn2k server/ Exchange 2k w/all current SPs. STEVE ...

Suddenly no pictures in HTML messages
Running XP pro SP3, Outlook 2002. About Wed. or Thurs, any html messages received do not include pictures. Did Microsoft send out an update that might have interfered? Or did I do something I'm not aware of? Thank you, Roberta Roberta, you wrote on Sat, 4 Apr 2009 06:52:06 -0700: > About Wed. or Thurs, any html messages received do not include > pictures. Did Microsoft send out an update that might have > interfered? Or did I do something I'm not aware of? There is no such an update. Verify if the Internet Explorer is in offline mode (go to the file menu in IE)...

Formula question 03-03-10
I am trying to complete the following. In s141 i have a drop list with 'yes' and 'no' as possiblities. In x141 i have a drop list with 3 possible choices, .02 , .04 , or .08 g141 is the originating cell p159 is the answer cell. if s141 remains empty or has 'no' chosen from the drop list i need p159 to remain blank, however if 'yes' is in s141 then i need the answer from g141 multiplied by .02 or .04 or .08 (which ever one is chosen from the drop list in x141) to be displayed in p159. Can anybody help? Thanks in advance. Scoob...

anchor picture to text box
(Publisher 2003) I have a newsletter with a Kudos box. In the corners of the box I have a happy face. I'd like the happy faces to be anchored to their corners so when I enlarge or shorten the box, the faces move along with the text box. Why not create a rectangle, insert the happy faces, group. The problem as I see it would be if you resize, the happy faces could be distorted if you widen or shrink the group. You would always have to re-size proportionally. -- Mary Sauer http://msauer.mvps.org/ "Helen" <Helen@discussions.microsoft.com> wrote in message news:193...

cannot move messages
Sometimes when I attempt to move a message from the inbox to a storage folder I receive the following error message - "An unknown error has occured. The selected message(s) could not be moved." Why am I receiving this message and how can this problem be corrected? Any suggestions would be appreciated. Thanks What kind of mail account is it? POP3, IMAP or HTTP? Both IMAP and HTTP accounts synchronize with the mail server, so moving a message from the mail account to the storage folder requires that WLM tell the mail server to delete the message from the server ma...

emailing as message
Using Publisher 2003. Whenever I send a newsletter as m essage., The document comes out a little smaller to the person that is ecieving the message. However, whenever i save the document as aa jpeg file and hen send is a opicture it comes the exact size which is 8.5 * 11. What can I do to make it not whrink i want to send as a message and not as a JPEG If the recipient doesn't have Publisher, then you could try sending it as a ..pdf attachment. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "Carl Thame" &...

Number of users per message store.
Does anyone know an easy way to calculate the number of ussers per message store, other tan counting them seperatly. Thanks, Mark in the ESM, you should be able to drill down to "Mailboxes", select them all, and get a count down in the "status" bar... -- Susan Conkey [MVP] "Mark A. Dudley" <mark@nospamcjmnetworking.com> wrote in message news:447495a7.179533468@msnews.microsoft.com... > Does anyone know an easy way to calculate the number of ussers per > message store, other tan counting them seperatly. > > Thanks, > Mark On Wed, 24 Ma...

catch(...)
Hi all, Can anyone tell me how to get the exception message from the catch_all exception handler ? try { //expection code } catch(...) { how to get the exception message?? } thanks in advance thanvir ...

Messages with no message ID?
I have a number of emails sitting around in my outbound queue (Exchange 2003) that never get sent. Some have been in queue for several months (>6 months). When I look in the queue itself and Find Messages, in the search results I see the email, but it has no sender. Properties reveal no message ID, sender, subject nor recipient. Futher, in my Queue directory, I see no .EML files that correspond with any of these stuck emails. Anyone know what the problem is here? ...