Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 8th, 2008, 11:00 AM
Registered User
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default resubmitting how to display message box

    Hi, Again Everyone:
In my post on February 7, 2008, How do you display a message box in query, I am trying to find out how to write the code for the procedure. That is once query is higlited and you click open and once query opens a Enter Parameters Value dialog box is displayed with a blinking cursor waiting for the user to insert data into it.
When I insert a three or four digit number as one of the numbers I have below and press OK I wil get get the number displayed in a Select Query dialog box. The query is doing what it is suppossed to do. But if I insert a number that is not in my database and press OK it will return a Select Query dialog box with a blinking cursor in an empty record row. That is allright I can live with that because I know the number is not there. But what I want to do is have a message box displayed "Number not found" when I press OK. I just want to know how do you go about writing a procedure to have a message box displayed "Number not found". My database is not connected to a server. It is on my C drive as: "C:\lottery\lottery numbers.mdb"

I have a database that has two fields:

Header Three digit NH Four digit MA low to high

Book02303 1279
Book02304 008
Book02305 899
Book02306 009
Book02307 4567
Book02308 3799

In the Design menu for query the wording I use for Criteria: [type Three digit NH Four digit MA, low to high]

Once again I would truly appreciate anyone's help in how to write code to include a message box. Thanks. Tyrone!

Old March 10th, 2008, 07:06 AM
Registered User
Join Date: Mar 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Maybe this question would be better answered in the Access VBA forum....????

Similar Threads
Thread Thread Starter Forum Replies Last Post
cURL is resubmitting the page diamondField PHP How-To 1 September 23rd, 2008 04:25 PM
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
How to display message box in query? tsuersrb Excel VBA 0 February 7th, 2008 02:17 AM
Display Japanese characters in a message box kalyanipradeep Excel VBA 0 September 22nd, 2006 04:14 AM
How to display a Message Box creative_eye General .NET 8 February 17th, 2005 07:23 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.