Thank you all for the good solution suggestions. I believe that FAYT is the most suitable solution. However, I still don't understand why the code I provided at the beginning is not working as expected.
Thank you for your suggestion. I've tested the code, but when I run it, it returns a runtime error 3061: Too few parameters, marking this line of code: Set Me.cmbOddelek.Recordset = .OpenRecordset
Thank you for your contribution. It works, but it's not exactly what I wanted because it doesn't display a filtered dropdown list; all the records are still in the list. When you enter the search text, it positions to the first matching record.
I want to reduce the number of displayed records in the dropdown list of the combo box containing the search term (= text entered in combo box) in any of the columns displayed in the combo box.
Thank you for your contribution, but unfortunately, I couldn't figure out how to adapt it to make it...
In Access, I have a form fTest with the unbound combo box cmbOddelek that has search-as-you-type enabled, VBA code below:
Private Sub cmbOddelek_KeyPress(KeyAscii As Integer)
Dim strSearch As String
Dim strSQL As String
' Combine the current text in the combobox with the typed...
All this time I'm talking about the data in the file you posted on Saturday (test.accdb). When I open this test file and try to open the form, I get the said error message. This also deletes all the data in the tOutput table.
Thank you, that works.
As for the table with redundant data - I don't like tables with redundant data either, but I was instructed by my boss to prepare the data in just such a query (or table) as I requested.
I checked all the date fields and found that Delivery_date in tDeliveries has the wrong field type. I changed it to the date/time (short date) type. But when I open the form, I still get the same error (Run-time error 3075).
Thank you, arnelgp, the temporary table look Ok, but when I open the form, I get a Run-time error 3075: Syntax error in date in query expression "ItemID=72370 And [Order_date]>=#12.30.2018# And [Order_date]<=#01.04.2018# pointin at this part of code:
Set rst3 =...
Thank you for your answer, Eberhard. Unfortunately, the result of your query is the same as of mine query q1 from the test database (although your solution is more elegant...:)). But this isn't what I'm looking for,
I'd like the query results look like this...
Thanks for your answer. Unfortunately, this isn't what I'm looking for. I'd like to have a query that returns data for all deliveries for a particular product and the associated purchase orders based on the delivery date. For example, for all deliveries for ItemID 72370, I'd like to see the...