Recent content by mishash

  1. M

    Solved Multiple JOINs issue

    1. Thank you very much! Your fix did the job. 2. I was confused by this article which explicitly says that in multiple JOINs the following JOIN joins a table to the previous (intermediate) result set (not to the previous table)...
  2. M

    Solved Multiple JOINs issue

    1. How do I do it in the same FROM statement? 2. In my example I join CustomerCountry to the result set of the 1st JOIN (which has a record for Argentina) , not to SupplierCountry. Don't I?
  3. M

    Solved Multiple JOINs issue

    Northwind DB Customers and Suppliers tables both have Country column (there is no Country table in the DB, so the Country field is not a FK). Argentina has no suppliers, but 3 customers. "Produce a full list of countries (derived from Customers and Suppliers tables) with total number of...
  4. M

    Solved Cascading combo box - Sorting filtered results

    Can't find the correct syntax to make it work. Please help. Private Sub cboBrand_AfterUpdate() Me.cboProductID.RowSource = "SELECT ProductID, ProductName, ProductNumber FROM tblProduct WHERE BrandID = " & Me.cboBrand ORDER BY ProductName End Sub
  5. M

    Solved Date functions: subtraction

    I left 2020 by mistake, of course. It should have been MONTH(DATE())-1 gives 0. Thank you!
  6. M

    Solved Date functions: subtraction

    I am trying to build button-click dates' VBA filter and seem to miss some logic here. - How come the MONTH function in MONTH(DATE())-1 gives 0, but in DateSerial(YEAR(DATE()), MONTH(DATE())-1, DAY(DATE()) gives 12? - In case of DateSerial(YEAR(DATE()), MONTH(DATE())-1, DAY(DATE()) the result is...
  7. M

    Solved Filter continuous form on dates interval

    All I need is criteria, correct. I know how to apply a fixed criteria - in this form I have btnCurrentYear, btnLastMonth etc with predetermined filters, for example: Private Sub btnCurrentMonth_Click() DoCmd.ApplyFilter , "MONTH(OrderDate)=MONTH(Date())" End Sub But I could not figure out...
  8. M

    Solved Filter continuous form on dates interval

    Thanks again. A side question. Sub Search() Dim strCriteria, task As String strCriteria = "OrderDate between " & Format(Me.StartDate, "\#mm\/dd\/yyyy\#") & " and " & Format(Me.EndDate, "\#mm\/dd\/yyyy\#") task = "select * from qryListOfOrders where (" & strCriteria & ")"...
  9. M

    Solved Filter continuous form on dates interval

    only the midnight between 09/30 and 10/01, no?
  10. M

    Solved Filter continuous form on dates interval

    I guess I see. Edited to strCriteria = "Orderdate between " & Format(Me.StartDate, "\#mm\/dd\/yyyy\#") & " and " & Format(Me.EndDate + 1, "\#mm\/dd\/yyyy\#") Thank you!
  11. M

    Solved Filter continuous form on dates interval

    The Default Value of OrderDate is =Now() indeed. The unbound StartDate and EndDate text boxes do not have default values. I only enter date (select from the Date Picker)
  12. M

    Solved Filter continuous form on dates interval

    OrderDate field, Date/Time type, Medium Date format I recall now I've read something about time element playing games, but don't remember exactly.
  13. M

    Solved Filter continuous form on dates interval

    frmListOfOrders (based on qryListOfOrders) has unbound StartDate and EndDate text boxes and search button btnSearch . The search sub is: Sub Search() Dim strCriteria, task As String strCriteria = "OrderDate between " & Format(Me.StartDate, "\#mm\/dd\/yyyy\#") & " and " & Format(Me.EndDate...
  14. M

    Query run crashes Access

    I wonder what might be corrupted in 78 lines long simple table
Top Bottom