Search results

  1. A

    Dlookup with multiple criteria

    Thanks for the tip. I wasn't aware of that. I will surely read about it and play with it today in order to get it right. I know I have a lot of learning to do, and I really appreciate any help!
  2. A

    Dlookup with multiple criteria

    Mark, you actually gave an answer right on top. As soon as I switched my regional settings to English-US, the code worked. So it had to be something with the way access deals with date (I noticed that all my tables are depending on regional settings). For the past few hours I have been reading...
  3. A

    Dlookup with multiple criteria

    No problem. I still don't have enought posts, but thanks for the sticky about uploading by boblarson. I have stripped everything, except necessary things. It is a work in progress (as I said, I'm learning a lot about it, and I know that there are things that I could do better). If you hit...
  4. A

    Dlookup with multiple criteria

    I am not getting any output, except the standard data type mismatch. Just to make it clear, lines were inserted just above With CurrentDb.CreateQueryDef("", SQL_SELECT)
  5. A

    Dlookup with multiple criteria

    ProductID from PriceHistory is Number (Long Integer), and Me.ItemName.Column(1) refers to an ID of the Item itself (that one is an autonumber). StartDate is a Date/Time type (short date), and a Form!Sales.SaleDate is also a short date (that one is a calendar, but format is short date).
  6. A

    Dlookup with multiple criteria

    Still getting the same error.
  7. A

    Dlookup with multiple criteria

    Thank you for your reply. There should not be many changes per item (currently there are 2-5, I really don't expect more than 10 changes). I have tried your suggestion, and I'm getting Run-time error 3464 : Data type mismatch in criteria expression It fails in: Me.PriceH = .OpenRecordset!Price...
  8. A

    Dlookup with multiple criteria

    Thanks a lot! I've tried with format option today, and it produced an error. Looks like I still have a lot to learn the correct syntax. Based on your suggestion, DLookup now looks like: curCurrentPrice = DLookup("[Price]", "PriceHistory", "[ProductID] = " & UsedID & " AND [StartDate] <= #" &...
  9. A

    Dlookup with multiple criteria

    I have been searching for answer to the issue that has been troubling me lately. This is my first access database project, so I expect a lot of things to go sideways, especially since I lack skills. Anyway, I have a table called PriceHistory and it holds ProductID, Price, StartDate (date is in...
  10. A

    Hello to all

    Alex here, from Serbia. Newcomer to Access and to this forum, but in my defense I have been searching for answers here for the past few months.
Back
Top Bottom