473,387 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Enter Parameter Values

If im using an "enter parameter values" box in a query to find information in a table and if you type in a value that doesnt exist how do you stop if from displaying a blank screen on your form??
Jun 25 '07 #1
1 2077
ADezii
8,834 Expert 8TB
If im using an "enter parameter values" box in a query to find information in a table and if you type in a value that doesnt exist how do you stop if from displaying a blank screen on your form??
I don't think that you can control the displaying of a blank screen in the Query Design Grid for a criteria that returns no Records. What you can do in code (VBA) is:
  1. Create a QueryDef Object based on your criteria (Parameter).
  2. Create a Recordset based on the newly created QueryDef.
  3. If the Recordset contains Records (Recordset.RecordCount > 0), open the Query.
  4. If the Recordset contains no Records (Recordset.RecordCount = 0), prompt the User and let him/her know that no Records exist for the specified criteria.
  5. Delete the newly created QueryDef (Query).
Jun 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Stuart E. Wugalter | last post by:
Hello. No one in the queries newgroup answered this question. I hope someone here can. Thank you. Stuart The following Update Query allows my users to substitute a numerical value for the...
9
by: Megan | last post by:
Hi- I'm creating a database of music bands with their cds and songs. I'm trying to program an SQL statement so that I can enter a string of text in a textbox, press the 'Enter' key, and have...
2
by: RBohannon | last post by:
I have a report with most fields populated by a query. However, some of the fields are variable in such a way that their values cannot be queried from a table. At present the values for these...
3
by: pelcovits | last post by:
I am trying to set up an unbound form to enter report criteria. I've followed the MS Office Assistance document: "Create a form to enter report criteria" which describes how to enter data (such...
1
by: Alex Nitulescu | last post by:
Hi. A newbie question, please: I have a function which gets some values from a database, based on a CategoryName. My function looks like this: Public Function GetProducts(ByVal CategoryName As...
8
by: Dan Holmes | last post by:
I am receiving data from the stream of a socket. I am trying to determine if the user pressed the Enter key. The buffer has 2 non-zero bytes when the user presses enter: 13 and 10. If i...
2
by: billtubbs | last post by:
Hi I am getting the common problem of the "Enter Parameter Value" dialog box, which pops up every time I execute a query. I built the query using the Expression Builder in Access. If any of my...
3
by: myemail.an | last post by:
Hi all, I use Access 2007 and have come across this error a number of times. I have two tables (customer information) which should contain - ideally - the same data. I create a query to compare...
7
by: adigga1 | last post by:
Hello EveryOne, I have a situation with a Form running an event; It works fine when it calls or manipulates number values; but when I put a character within the numbers or use alpha-numeric...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.