Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68

    Listbox wizard (Accss2000) "no value given for one or more parameters"

    Hi,
    I was trying to add a list box to my form to display the results of a query. When I use the wizard, after selecting the query and adding all the fields, and I hit "next" I get the error message "No value given for one or more parameters". Why is this?

    The query works fine on its own, and I can display it in a sub-form, but not in a list box or combo box, whereupon I get the above error message.

    If I populate the list box with a table, it works fine, but not when I use a query...

    Any suggestions?



    Thank you,
    Allay

  2. #2
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    Can you post you SQL? Right click on the query tab and select SQL View.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Ally1205 View Post
    ....The query works fine on its own, and I can display it in a sub-form, but not in a list box or combo box, whereupon I get the above error message......
    This does not make sense. The message you are getting indicates there is something in one of the criteria fields that is unknown. I would be looking in the criteria fields or the query and also for an alias.

  4. #4
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by lfpm062010 View Post
    Can you post you SQL? Right click on the query tab and select SQL View.
    Thanks - Do you mean the tab ibn the database window? Right-clicking on it doesn't give me a 'view SQL' option. I cannot find any way to get to SQL view...

  5. #5
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ItsMe View Post
    This does not make sense. The message you are getting indicates there is something in one of the criteria fields that is unknown. I would be looking in the criteria fields or the query and also for an alias.
    Here is a screencap of my query in design view:
    Click image for larger version. 

Name:	query111.JPG 
Views:	18 
Size:	59.7 KB 
ID:	14773
    Thanks....
    Ally1205
    Attached Thumbnails Attached Thumbnails query111.JPG  

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Open the query object. There are different views..... Design View, Datasheet View, SQL View are few that I use.


    .

    Click image for larger version. 

Name:	SQL_View.jpg 
Views:	19 
Size:	33.7 KB 
ID:	14774

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Yup, lots of criteria that is dependant on a form name.

    Make a copy of your query. YOu can right click copy and paste the object. Rename it and then remove the criteria. This could be the start of a query object you can use as a RowSource for your listbox.

  8. #8
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ItsMe View Post
    Open the query object. There are different views..... Design View, Datasheet View, SQL View are few that I use.
    OK - sorry - I just found how to access the SQL. Here it is:
    - - - - - - - - -
    SELECT CustomerT.FirstName, CustomerT.LastName, CustomerT.City, CustomerT.State
    FROM CustomerT
    WHERE (((CustomerT.FirstName) Like "*" & [Forms]![MainF]![SrchFirstName] & "*") AND ((CustomerT.LastName) Like "*" & [Forms]![MainF]![SrchLastName] & "*") AND ((CustomerT.City) Like "*" & [Forms]![MainF]![SrchCity] & "*") AND ((CustomerT.State) Like "*" & [Forms]![MainF]![SrchState] & "*"));

  9. #9
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by lfpm062010 View Post
    Can you post you SQL? Right click on the query tab and select SQL View.
    Thanks... Pls see my reply to ItsMe.

  10. #10
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    You can paste this into the Row Source of your list box

    Code:
    SELECT CustomerT.FirstName, CustomerT.LastName, CustomerT.City, CustomerT.State FROM CustomerT

  11. #11
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ItsMe View Post
    You can paste this into the Row Source of your list box

    Code:
    SELECT CustomerT.FirstName, CustomerT.LastName, CustomerT.City, CustomerT.State FROM CustomerT
    Thanks, but this makes the list box display the contents of my CustomerT table. I want it to display the search results of my SearchQ query (per the SQL I posted in previous message).
    Ally1205

  12. #12
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    I was thinking that you need to test for null, but with the wildcards leading and trailing, it should not be necessary. This leads me to believe a control name does not exist that is described within your Where Criteria. Not too sure what your A2000 error msg translates to for newer versions. Is the form named "MainF" open?

  13. #13
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,616
    The parameterized query is a saved Access query object? The listbox RowSource is referencing the query object? Then the listbox RowSource just needs to be:

    SELECT * FROM SearchQ;

    Then set the listbox ColumnCount and ColumnWidths properties.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #14
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    When you run your query, do you have your form "MainF" open? If not, that is why it is asking for parameters.

  15. #15
    Ally1205 is offline Advanced Beginner
    Windows 7 64bit Access 2000
    Join Date
    Jul 2013
    Posts
    68
    Quote Originally Posted by ItsMe View Post
    I was thinking that you need to test for null, but with the wildcards leading and trailing, it should not be necessary. This leads me to believe a control name does not exist that is described within your Where Criteria. Not too sure what your A2000 error msg translates to for newer versions. Is the form named "MainF" open?
    Yes, it is open, because the list box is on that form.
    Ally1205

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 01-30-2013, 03:05 PM
  2. Automating "Append" Query with Parameters
    By Monterey_Manzer in forum Queries
    Replies: 1
    Last Post: 10-04-2012, 12:00 PM
  3. Access 2003 "Link Text Wizard" bug
    By spacekowboy in forum Import/Export Data
    Replies: 2
    Last Post: 05-30-2012, 02:28 PM
  4. Using InfoPath under "Create Email" wizard
    By Alex in forum Import/Export Data
    Replies: 0
    Last Post: 07-21-2010, 07:30 AM
  5. How to Filter When Using The "Create E-Mail" Wizard
    By MFriend in forum Import/Export Data
    Replies: 3
    Last Post: 07-16-2010, 09:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums