473,396 Members | 1,789 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,396 software developers and data experts.

Why does "Enter your parameter value" keep coming up?

Fspinelli
By putting forms![name of form]![name of checkbox] in the criteria area and in the criteria row putting TRUE runs a query for me off of check boxes.

However, "Enter your parameter value" boxes pop up for each check box when the form opens. Why is that and how do I avoid it?

All I want is for the end user to check the boxes and then press the button to run the query.

Thank you!
Dec 10 '10 #1
7 9051
NeoPa
32,556 Expert Mod 16PB
Faith:
However, "Enter your parameter value" boxes pop up for each check box when the form opens. Why is that and how do I avoid it?
You say "when the form opens", but I would expect this to occur only when the query is attempted. Are you sure?

We will also need some details if we're to be any help with this. What is the SQL of your query? If the CheckBoxes really do have a problem, then how are they defined? There needs to be more information in the question.
Dec 13 '10 #2
What I'm trying to do creat a form where the end user will click on the checkboxes (it could be more than one checkbox) and have the query run based on those choices. The query's table will pop up with the name of the company. I also need to generate a report based on the results, too.

Here is the SQL that I have in my query:

Criteria:

Expand|Select|Wrap|Line Numbers
  1. SELECT Contacts.Company, Contacts.FoF, Contacts.[NHF], Contacts.[SM], Contacts.[FC], Contacts.[CO]
  2. FROM Contacts
  3. WHERE (((Contacts.FoF)=[forms]![Portfolio Status subform]![FoF]) AND ((Contacts.[NHF])=[forms]![PStatus subform]![NHF]) AND ((Contacts.[SM])=[forms]![PStatus subform]![SM]) AND ((Contacts.[FC])=[forms]![PStatus subform]![FC]) AND ((Contacts.[CO])=[forms]![PStatus subform]![CO]))
OR:

Expand|Select|Wrap|Line Numbers
  1. (((Contacts.[CO])=[forms]![PStatus subform]![CO]) AND (([forms]![PStatus subform]![FoF]) Is Null) AND (([forms]![PStatus subform]![NHF]) Is Null) AND (([forms]![PStatus subform]![SM]) Is Null) AND (([forms]![PStatus subform]![FC]) Is Null));
Thank you very much!
Dec 13 '10 #3
NeoPa
32,556 Expert Mod 16PB
I'm still confused as you didn't answer my first question. Thank you for the SQL, but that is only data from which to work. Without the question I have nowhere to go.

To save a valueless post, I've redone your SQL so that it can be read more easily, though what you're saying with the OR: bit at the end I have no clue about.
Expand|Select|Wrap|Line Numbers
  1. SELECT [Company]
  2.      , [FoF]
  3.      , [NHF]
  4.      , [SM]
  5.      , [FC]
  6.      , [CO]
  7. FROM   [Contacts]
  8. WHERE (([FoF] = [forms]![Portfolio Status subform]![FoF])
  9.   AND  ([NHF] = [forms]![PStatus subform]![NHF]) 
  10.   AND  ([SM] = [forms]![PStatus subform]![SM])
  11.   AND  ([FC] = [forms]![PStatus subform]![FC])
  12.   AND  ([CO] = [forms]![PStatus subform]![CO]))
OR:
Expand|Select|Wrap|Line Numbers
  1. WHERE (([CO] = [forms]![PStatus subform]![CO])
  2.   AND  ([forms]![PStatus subform]![FoF] Is Null)
  3.   AND  ([forms]![PStatus subform]![NHF] Is Null)
  4.   AND  ([forms]![PStatus subform]![SM] Is Null)
  5.   AND  ([forms]![PStatus subform]![FC] Is Null));
Are we still talking about a form problem (as you implied when you said it occurred as the form was opened)? Or should we be looking more closely at the query itself (as the error message indicated)?
Dec 13 '10 #4
It happens when I try to open the form up. I can only open the form in design view. If I try to open it up, like a user would, those parameter boxes come up.

Ah I see what you mean on how to post SQL, I will remember that next time. I appreciate the revision.

I am trying to create a form that the user can check the boxes (choices) to run a query. I have the form with the checkboxes. I have the query (SQL). But I don't know why the Enter Parameters keeps popping up.

Do you have a better suggestion for a checkbox based query?
Dec 13 '10 #5
NeoPa
32,556 Expert Mod 16PB
That sounds like a problem whose details we don't have then Faith. If this is happening when the form is opened then something is possibly set up in the form that we need to know about if we're to progress. It may be a good idea to post a copy of the database for me to have a look at. I'll dig up some general instructions for you on how best to go about that if you're interested.

When attaching your work please follow the following steps first :
  1. Remove anything not relevant to the problem. This is not necessary in all circumstances but some databases can be very bulky and some things do not effect the actual problem at all.
  2. Likewise, not entirely necessary in all cases, but consider saving your database in a version not later than 2003 as many of our experts don't use Access 2007. Largely they don't want to, but some also don't have access to it. Personally I will wait until I'm forced to before using it.
  3. If the process depends on any linked tables then make local copies in your database to replace the linked tables.
  4. If the database includes any code, ensure that all modules are set to Option Explicit (See Require Variable Declaration).
  5. If you've done anything in steps 1 to 4 then make sure that the problem you're experiencing is still evident in the updated version.
  6. Compile the database (From the Visual Basic Editor select Debug / Compile {Project Name}).
  7. Compact the database (Tools / Database Utilities / Compact and Repair Database...).
  8. Compress the database into a ZIP file.
  9. When posting, scroll down the page and select Manage Attachments (Pressing on that leads you to a page where you can add or remove your attachments. It also lists the maximum file sizes for each of the allowed file types.) and add this new ZIP file.
It's also a good idea to include some instructions that enable us to find the issue you'd like help with. Maybe some instructions of what to select, click on, enter etc that ensures we'll see what you see and have the same problems.
Dec 14 '10 #6
Nothing was working. So I started from scratch (before seeing your post).

Query name is "PortStat"

My query has the company name plus the fields/controls
(NH, SM, FC, CO).

I then opened a blank form (design view), bound it to the PerfStat query. I then selected the checkbox in the menu area then dragged over the controls. Easy enough.

This time the form opens just fine. The checkboxes take the check mark, but as soon as I run the query it brings up all records showing those check boxes whether they are checked or not.

So I'm sure I need to put something in the criteria of the query but not sure how to. It could be one or more of the boxes checked. Something to tell it to only pull the records with the boxes that were checked.

Does this come across as clear? Hard to explain it (I'm still very far from an expert).
Dec 14 '10 #7
NeoPa
32,556 Expert Mod 16PB
Why would your form, that is there to control which records to show in a query, be bound?

Think about this clearly and deeply. If you get what's going on here you will have an important understanding.
Dec 15 '10 #8

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

Similar topics

2
by: lgo | last post by:
I have read several variations of this topic posted on this news group. However I was not able to find the answer for my problem. I am trying to build code (see below) to update a large single...
6
by: ineedahelp | last post by:
I have been working on trying to get some code to work in an ON CLICK EVENT. I am having trouble with the syntax of an SQL statement. The program was stopped without running to completion many...
3
by: Darin | last post by:
I have a problem I just can't figure out. I have a form with a subform, and the recordsource of the subform has criteria based on some unbound fields in the parent form so that data in the parent...
1
by: waltnixon | last post by:
I've got an MS Access query which runs fine when double clicked and returns all of the rows in a test database I'm building. I've set up a multi group report based on the query. I immediately...
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...
1
by: Sport Girl | last post by:
Hi everybody, please can anybody help with this question: I an working with Acees 2007, and everytime I run a report I have a dialog box prompting "Enter Parameter Value" requesting for a...
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...
1
by: Chris Brooks | last post by:
I used the CmdButton Wizard and arrived at the following: where condition: "=" & "'" & & "'" I am trying to Open a separate pop up form based on the currently selected Company Name in my...
2
by: Joana Johnson | last post by:
I have two quarries one that gives me a list of book sales(customer, quantity, book number,date) and the other gives me a list of Book Numbers and their corresponding prices. I need to create a field...
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.