Results 1 to 2 of 2

Thread: Report Help

  1. #1
    Join Date
    Jan 2010
    Posts
    44

    Unanswered: Report Help

    I am trying to pass a combobox.Text field to my query to open my report. When I do the State Abbrevation it shows a number instead of a TN or FL. When I do a employee code which is a number it works fine. Below is an example that is working and the one I am having issues with. I have the user select the state on a form, then in the button click, open the form, and put the control in my actual query in the WHERE clause.

    Below is the one that is working:

    SELECT SALE_DATE, SALE_ID, TOTAL_SALE, PAYMENT_TYPE
    FROM SALES
    WHERE EMPLOYEE_CODE=([Forms]![Employee Queries]![cbEmployeeCode])
    ORDER BY SALE_DATE DESC;

    This one next is not working for the state abbrev:

    SELECT CUSTOMER_CODE, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_ADDRESS, CUSTOMER_CITY, CUSTOMER_ZIP
    FROM CUSTOMER
    WHERE CUSTOMER_STATE=([Forms]![Customer Queries]![cbStAbr]);

  2. #2
    Join Date
    Jan 2010
    Posts
    44
    I fixed it. It was pulling the autonumber tied with the state abbreviation and the state name. I had to take that out of my SQL statement that fills the comobox.

Posting Permissions

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