0

I have form with several comboboxes set to filter my database by record. For example I have: product, type and size columns and according to this i have dynamically changing comboboxes. So what I want is to find a record that matches all choices from combobox. Like this. enter image description here

but there is one "but".

enter image description here

If i choose type 6s and then I choose 64gb it returns to value 5s and 64gb. I mean It searches the first record in size column according to combobos so I want somehow to find the first record that matches all three comboboxes.

Community
  • 1
  • 1
nika
  • 59
  • 1
  • 8
  • It looks like there's a problem with your query. Could you post the SQL code of the query giving you poor results? Or is this a bound form? – MoondogsMaDawg Mar 15 '16 at 19:10
  • it's a bound form. on combobox i have SearchForResult function and in one of the "where condition" it has: ="[size] = " & "'" &[Forms]![Table1]![sizes]& "'" – nika Mar 15 '16 at 20:00
  • I'm not sure how to do this with a bound form. Is your form name really "Table1"? (`[Forms]![Table1]` looks odd)? Someone else may need to chime in, I'm lost. – MoondogsMaDawg Mar 15 '16 at 20:48
  • Sorry about that I said it was bound form, but I really don't know what it is. I just knew it's not SQL code. And yeah it's name is Table1 beacuse it's like a test form to understand how the real form should work. And if it helps you I made a querry with SQL code and it works implacably it's: "SELECT table.ID, table.product, table.type, table.size, table.maker FROM product WHERE product = "Iphone" And type = "5s" And size = "64gb"; " I want my form to work the same way this SQL code works – nika Mar 15 '16 at 21:01
  • show us this `SearchForResult` function. Do you call it each time a value change in any combobox? – Thomas G Mar 15 '16 at 21:02
  • Yes. And I want value to change after last combobox updates, but I cant write where condition for last combobox so it will apply search according on multiple comboboxes. It's like: ="[size] = " & "'" & [Forms]![Table1]![sizes] & "'" sizes- is my combobox name. I thought it would be like: ="[size] = " & "'" & [Forms]![Table1]![sizes] & "'" And "[type] = " & "'" & [Forms]![Table1]![types] & "'" But it won't work. – nika Mar 16 '16 at 08:14

0 Answers0