Results 1 to 4 of 4

Thread: problem with query I think

  1. #1
    Join Date
    Apr 2007
    Posts
    22

    Unhappy problem with query I think

    I have an inventory app (Access 2003) that I am trying to get a report to print data from a query and from an open form - the data I need from the form includes the result of a combo box. If I try to build a query that includes the combo data along with the rest of the other query access says its an ambiguous join and to create the queries separately and combine them ??? I have no clue about combining them - I can create 2 separate queries that function correctly when the forms involved are open - I just don't have a clue on how to combine the two and/or how to print the lookup value of the combo box on my report - I'd prefer not to build an output form and print from that and the user doesn't want to use subforms (first form selects customer info, second inputs customer items, when done prints list of items with customer info in heading - problem is with dropdowns used for freight type and customer locations) My guess is that it can be done using recordsets but I have not found any useable info on how

    If ANYONE can help it would be greatly appreciated!!!

  2. #2
    Join Date
    Apr 2007
    Posts
    22

    Thumbs up Found the answer

    I found an access sample on blueclaw-db.com that pointed the way.

    All I had to do was point the value of the text box on the form to [form]![comboxx].[Column](1) where 1 is the column I needed. I also needed to display all of the address info for a similar dropdown that only displayed the city and state - to do that I included all of the address info on the original dropdown but set the column width to 0" and pointed to the appropriate column on the report.

    Without exageration I spent at least 10 hours on this - it took me 15 minutes once I found that download.

    If anyone has any other solutions I'd like to see them anyways.

    Thanks,
    Cyber-Guy

  3. #3
    Join Date
    Oct 2006
    Location
    Maitland NSW Australia
    Posts
    275

    Smile Another solution

    Here is a method that I use to do the same process. On my form I use a dropdown to select the item etc. In the attached example I used a drop down that only has a reference number which is the primary key and field for staff.

    When the staff is selected then a report is opened, look at the recordsource for this report called rpt_selected_staff as I have linked three tables to obtain the required data for the report.

    Contact me if you require more information.

    Allan Murphy
    Attached Files Attached Files

  4. #4
    Join Date
    Apr 2007
    Posts
    22
    Thanks - that was pretty much my original solution - it worked for most of the data on the report but access balked on two of the combo lookups due to ambiguity.

    Cyber-guy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •