User Profile

Collapse

Profile Sidebar

Collapse
echamorro
echamorro
Last Activity: Sep 10 '14, 03:43 PM
Joined: Aug 17 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • echamorro
    started a topic Query with multiple criteria

    Query with multiple criteria

    Hi all. I need to add one more criteria to my query. Two will be taken from a combo box and third one will be from one of the fields from the query in form of a text. It is not working. Could someone help me please?

    Code:
        'Name of report to print
        stDocName = "BARCODE SP kanban report w_trigger"
    
        'Name of query
        strQueryName = "SP kanban query"
    ...
    See more | Go to post

  • Thanks I found what I was doing wrong. First of all, the quantity field is double, not string. I converted the string to double and it worked.
    The only thing I can't figured out is to use second option (please see code below) which uses the two field separately instead of a single SQL statement.
    Code:
    this code works.
        strSQL = "[Part_No]='" & Me.cboPartNumber & "'  And [Count]<=" & CDbl(Me.cboQuantity.Value)
    ...
    See more | Go to post

    Leave a comment:


  • Thanks, it worked! Now I have another dilemma I need to use both fields. This is what I have done, but it is not working. Can you please help again?
    Code:
    stDocName = "BARCODE SP kanban report w_trigger"
        strQueryName = "SP kanban query"
        strPartNumber = "[Part_No]='" & Me.cboPartNumber & "'"
        strQuantity = "[Count]='" & Me.cboQuantity.Value & "'"
    ...
    See more | Go to post

    Leave a comment:


  • Open a report based on query with multiple criteria

    Hi there, I am new in VBA. I created a query from a table that lists several fields. Every time the query is used, it asks the user to enter the part number he/she wants to see and the quantity to print. I created a report from that query and it works fine. Once the user enters that information the report is printed/viewed. Instead of the user enter the information, I created a form with two combo boxes. So the user can select the part number from...
    See more | Go to post
    Last edited by Rabbit; Aug 18 '14, 04:42 AM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Working...