Hi,
Try the following (easy to maintain -- not the most efficient means though):
- Create a textbox control on your Form "txtTagNumber"
- Create your query in design view that has parameter reference to the
above textbox control
- Create the following OnClick event procedure behind a command button on
the form
Function Command1_OnClick()
Me.txtTagNumber = InputBox("Enter a value to search")
IF IsNull(DLookUp("[TagNumber]","[Name of your table]","[TagNumber] = " &
strTagNumber) THEN
msgbox "there is not that Tag number in the system"
ELSE
DoCmd.OpenQuery "Name of your query"
END IF
End Function
I hope this helps! If you have additional questions on this topic, please
respond back to this posting.
Regards,
Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<
http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <
http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."
This posting is provided "AS IS" with no warranties, and confers no rights
-
--------------------
| Thread-Topic: How to make a message
| thread-index: AcQKodhPPZEO7xgmSUSzp5nCoG+hSQ==
| X-Tomcat-NG: microsoft.public.access.queries
| From: =?Utf-8?B?TGVl?= <
[email protected]>
| Subject: How to make a message
| Date: Mon, 15 Mar 2004 07:26:10 -0800
| Lines: 4
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.queries
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.queries:193760
| NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
| X-Tomcat-NG: microsoft.public.access.queries
|
| Hello,
I have a query that allow to enter the Tag number of a chemical then its
list the item. Now I want to make a message that If there is not Tag number
in database, give the message " there is not that Tag number in the
system". is there any suggestion that would help?
Thanks,
|