Results 1 to 5 of 5
  1. #1
    hvnlysrph is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    3

    Use input from form not pop-up parameter

    I am trying to get a query to use the input that will be entered into a form using a control box and not pop-up a parameter box when the form is open. This is the code I am using in the query:




    SELECT Customer.CUST_FNAME, Customer.CUST_LNAME, Customer.CUST_ADDRESS, Customer.CUST_CITY, Customer.CUST_STATE, Customer.CUST_ZIP, Customer.CUST_HOMEPHONE, Customer.CELL_NUMBER
    FROM Customer INNER JOIN Loaner_Phone ON Customer.CUST_ID = Loaner_Phone.CUST_ID
    WHERE (Loaner_Phone.LOANER_ID)=[Forms]![LoanerSub]![LOANER_ID];


    Everytime I open the form the parameter box pops up, also whenever I get into the form and change the data in the drop down control box, the parameter box pops-up again asking for the same info. I would just like to change the code to where it will get the information from that drop down box. Any suggestions?

    Thanks in Advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Is LoanerSub a subform?

    Where is this query used?

    Do you want to provide project for analysis? Follow instructions at bottom of my post.
    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.

  3. #3
    hvnlysrph is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    3
    The LoanerSub is a subform which I embedded into the Exchange form under the label Loaner Phone.
    Attached Files Attached Files

  4. #4
    hvnlysrph is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    3
    Something I am thinking about that would work (if I could figure it out) is if the query is not pulled up by the Loaner ID. Instead that would just pull the information into the form, and when the info is pulled into the Customer id field, that would create the query. That way, what ever is entered into the customer id is what will appear in the form (for example, if the user wanted to search for a customer via the customer ID and the form would pull up the information for the user to verify before assigning it to the loaner id.......if that makes anysense)

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    Two things I have never seen before:

    1. Report used as a ControlSource for a subform/subreport control on a form. And further, the report is used in two sub container controls, one on the main Exchanges form and one in the LoanerSub subform. Not able to set the Master/Child links on the latter. This is why you tried the PARAMETERS and WHERE clauses? I have never used a PARAMETERS clause. Why show the report twice or even at all? All of the customer information can be made viewable on the forms by query joins or textbox ControlSource referencing columns of a combobox.

    2. Relationships set up between MySys tables. Why are you doing this?
    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.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 01-10-2012, 09:56 AM
  2. Input parameter in report header
    By geremore in forum Programming
    Replies: 3
    Last Post: 08-08-2011, 01:41 PM
  3. Replies: 1
    Last Post: 08-02-2011, 07:21 AM
  4. Replies: 1
    Last Post: 11-07-2010, 11:04 AM
  5. Display Query Value That Requires Input Parameter
    By Access::Student in forum Access
    Replies: 1
    Last Post: 05-29-2009, 08:43 PM

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