Recent content by D0165

  1. D

    Send email to recipient based on query

    Yes, that is what the SQL looks like. You are very perfect! It works. Thank you again!
  2. D

    Send email to recipient based on query

    So the only thing I cannot figure out, is how to pass the Between X and Y in the parameter. I tried this, but does not seem to be working: Spopup = "Between " + InputBox("Start Number") + " And " + InputBox("End Number") Set MyDB = CurrentDb Set MyQD = MyDB.QueryDefs("query1234")...
  3. D

    Send email to recipient based on query

    Yep, just did that indeed! Could have thought of that myself haha... Thank you !! One last question, Lets say i want to use the inputbox(or multiple inputboxes) so that I can filter in the query. The query can be: Between 1 and 10 for Example. So I want to choose the between numbers/text. So...
  4. D

    Send email to recipient based on query

    Hi, thanks for the quick reply! I want the user to choose at that time, what the parameter needs to be, so i think inputbox is the best way? So today user chooses "firstname1", tomorrow it could be "firstname2" or "firstname3"
  5. D

    Send email to recipient based on query

    Hi! What would be the benefit of this? Is referring to a field a better option? Looks like for now the inputbox is working the way I need it to be. Or do you see any downsides from using the inputbox? Thanks!
  6. D

    Send email to recipient based on query

    you are a lifesaver! This works!! Test was a name for example, this is a string. Would it be possible, to have a second inputbox after the first is filled in, that you can fill in for example; the date 01-06-2022 and that it passes this date in all the emails in the body?
  7. D

    Send email to recipient based on query

    So it looks like a problem with the Query itself in combination with the vba script. When I fill in "test" as a criteria, it works with the button. But I use [test] so that I will get a popup first, and based on what I fill in, the query will run that criteria. How can I make the vba/button...
  8. D

    Send email to recipient based on query

    Hi! Thank you for your quick reply! So I tried that, the query name is query1234 And changed it to this: Set rst = MyDB.OpenRecordset("query1234", dbOpenForwardOnly) But that does not work. Then I get error 3061 "error 3061 too few parameters expected 1"
  9. D

    Send email to recipient based on query

    Hi, I want to make a button, that starts sending out emails based on a query. I dont want the Query to be in the vba script itself, but I want the button to open a query first, then based on that results I want to start sending mails. The query uses a popup, when i click the query it opens a...
Top Bottom