Search results

  1. Z

    Combobox value for multiple filter criteria in a Query

    Hi again I have tried to insert the code into my SQL, but I get an error after the "Where" clause. I can see the issue in appending "And" after the "Where" clause but do not know how the syntax should be. Private Sub cbm_DepartmentSelection_AfterUpdate() strSQL = "SELECT [dbo_KonfAir...
  2. Z

    Combobox value for multiple filter criteria in a Query

    Thanks a lot... You are fast :-) This i just the functionality I am looking for. However this is just a part of a Query. I need to put the rest of the SQL into the VBA Code. Or maybe divide it Would that be possible?? Your code replaces the switch function. SELECT [dbo_KonfAir DRIFT$Sales...
  3. Z

    Combobox value for multiple filter criteria in a Query

    I had some time to look at this again and I made a small sample where I try filter by type and there are more than one criteria. Value 1 in cbm box should filter "Nummer" by 1 and 6 to show all kitchen elements and so on. But something is wrong in the SQL filter expression. I hava attached the...
  4. Z

    Combobox value for multiple filter criteria in a Query

    Ok - Thank you for pointing me in the right direction.
  5. Z

    Combobox value for multiple filter criteria in a Query

    Hmmm... I have tried the switch function and added the like operator before. This works fine when only the filter is limited to one criteria. Is it wrong to user OR if I want to add another criteria. If I do Access add like operators before both criteria in the end and nothing comes up in the...
  6. Z

    Combobox value for multiple filter criteria in a Query

    I have tried to google for additional information and from that I have modified my search string. But still no luck. Any good ideas[Item Category Code]Like """ & [Forms]![frm_ctn_List]![txt_DepartmentSelection] & "*"""
  7. Z

    Combobox value for multiple filter criteria in a Query

    Thank you for the information Maybe I am missing the point here. Please bare over with me :) I have a form "frm_ctn_List" with Query "qry_PanelFilter" as record source. On the form is a combobox "cbm_DepartmentSelection" and at textbox "txt_DepartmentSelection". The textbox is passes the column...
  8. Z

    Combobox value for multiple filter criteria in a Query

    I have attached the source for my combo-box. Only ID4 gives any result. If I use the criteria directly in the Query then it works fine, for all ID´s
  9. Z

    Combobox value for multiple filter criteria in a Query

    I have a combo-box on a Form based on a Query which I would like to filter by department. The actual filtering is done by an "Item Category" field. The Item category is usually a 5 figure value. The combo-box populate at hidden textbox on the form. This textbox is referenced in the filter...
  10. Z

    text box that look up value from another table than the forms record source

    hmmmmm... Yes and no Tried to buy my way to a solution with limited success thougt :) Ended up with 3 sub queries combined in one result query. SELECT [dbo_KonfAir DRIFT$Reservation Entry].[Entry No_], [dbo_KonfAir DRIFT$Reservation Entry].[Item No_], [dbo_KonfAir DRIFT$Reservation...
  11. Z

    text box that look up value from another table than the forms record source

    This is what I have been using so far. Since my SQL skills i next to nothing, it has been made in Design view. It pretty much gives me what I need except from the duplicate [Source ID] which is a no go This is almost certainly not the right way to do it, so I try to get by with the knowledge I...
  12. Z

    text box that look up value from another table than the forms record source

    When I run this query I get prompted to enter Parameter Value Query1.Entry No_
  13. Z

    text box that look up value from another table than the forms record source

    It doesnt matter cause SalesNo, Desceiption and ItemNo will be identical for the two Entry No_
  14. Z

    text box that look up value from another table than the forms record source

    Hi If grouped distinct by Entry No_ and ProductionNo and the Description an Item No_ fields is added I think it is perfect :) As you can see in the attached image, production order no 570259 is shown twice. As explained in previous post this is caused by a sales order containing the same item...
  15. Z

    text box that look up value from another table than the forms record source

    Maybe I also should have mentioned that the same item number and the corresponding description can be represented many times in the Reservation entry table.
  16. Z

    text box that look up value from another table than the forms record source

    Se attached image for result. Grouping by Item No_ or Description should not be necessary because they will always be the same. They represent a positive and negative. For example we sell two items a need is created which corresponds to "0" value (One record). Now a production order is created...
  17. Z

    text box that look up value from another table than the forms record source

    In the illustration image I made 570260 is the production order number coming from sales order number 90394
  18. Z

    text box that look up value from another table than the forms record source

    Actually it’s the other way around 37 is the sales order table number and 5404 is the production order table number. That’s always stay the same. The reason for this query is to find which production order comes from which sales order. The only place in our ERP system where they are linked...
  19. Z

    text box that look up value from another table than the forms record source

    [Entry No_] always comes in pairs and the corresponding [Item No_] will also be the same 2 values... But a specific value in [Item No_] can be represended multiple times.
  20. Z

    text box that look up value from another table than the forms record source

    The sql below give an error. Image attached. Maybe the sql is wrong build compared to what I would like to accomplish (Try looking at the attached image Query.png) "Entry No_" come in pairs in this table. The information in the 2 paired records should be populated in to one record for each pair...
Back
Top Bottom