Recent content by chuckcoleman

  1. C

    Inserting multiple rows into an email created by VBA

    Thank you. I’ll try your suggestion tomorrow morning.
  2. C

    Inserting multiple rows into an email created by VBA

    Hi, I have been using VBA to send an email for several years now. The email is generated from a form where payments are inserted for property lots. Things have changed and I now need to include in the email information how much the payment was for each lot. For instance, owner ID number 21 owns...
  3. C

    Having trouble getting a report to use two different recordsets

    Hi MajP. I couldn't use the same query because I created a new table that became the criteria for one of the two queries by joining it to other tables. This is kind of an experiment where I had Access pick on a random basis 100 customer ID's where those clients/ID's don't have an email address...
  4. C

    Having trouble getting a report to use two different recordsets

    Hi Pat, your feedback worked! Thank you, I always appreciate your clarity. As you indicated, the biggest issue I had was not placing the code in the On Open section of the Report. I looked at a lot of examples online and none of them suggested or addressed that. Thank you again for your clarity...
  5. C

    Having trouble getting a report to use two different recordsets

    Gasman, I don't understand your question. I set rs100 to one of the queries and rsAll to the other query. in the DoCmd.OpenReport I open the right report and I think I'm setting the recordset to one of the queries after the preview, two commas and then the strRecordSource. The WHERE statement is...
  6. C

    Having trouble getting a report to use two different recordsets

    Hi, I want to open a report and use one of two different queries based on the value of a field in a form. In the code below UseTop100 looks at the value of a field using DLookUp on a form. Based on if that value if True I want to use the query "Startup Letter Query-2-Top100". If the value is...
  7. C

    Invalid Use of Null

    I eventually found the problem. In that form I had a Mouse Down event that I overlooked in a different module than my original post. In that module I had two lines: EmailLU2 = DLookup("", "[Email for Receipt]", "[LotNbr]= '" & Nz(EmailLU) & "'") OwnerLU = DLookup("[Owner]", "[Email for...
  8. C

    Invalid Use of Null

    I moved the break point to a MsgBox immediately after the DIM statements and no change in what I see in the Editor and the Invalid Use of Null continues. Frustrating!
  9. C

    Invalid Use of Null

    When I set the break point on the "On Error GoTo line", which is even before the DIM statements, why do I get the Invalid Use of Null immediately.
  10. C

    Invalid Use of Null

    Gasman, I could probably use some guidance here. In the Editor I clicked on the gray vertical bar immediately to the left of my "On Error GoTo..." line. A red dot was placed there. When I click on the "Print" button in the form I get Invalid Use of Null. I click on OK which brings the Editor to...
  11. C

    Invalid Use of Null

    OK, I tried NauticalGent's suggestion and Pat Hartman's suggestion. Neither suggestion worked. Here's what's weird. When I put the MsgBox immediately below the DIM statements that says, "Hi Chuck", when I run the code by clicking on the button the first thing I get is "Invalid Use of Null" and...
  12. C

    Invalid Use of Null

    First reply before I examine the other suggestions to look at. When I put a MsgBox immediately after the DIM statements and then set a break point there, I immediately get the Invalid Use of Null error. I'll now look at the other suggestions.
  13. C

    Invalid Use of Null

    Hi, this has been driving me nuts for a day now. I have a form called Revenue Input Form. When a payment is received, the Lot Number is entered along with two other items and the amount of the payment. If the customer has an email address, there is a button on the form that displays "Email" and...
  14. C

    Changing the RecordSource for a Report

    I've rewritten my report to have the second sub report NOT nested in the first sub report. I think I can make this work, fingers crossed. Thank you all for your help.
  15. C

    Changing the RecordSource for a Report

    I found this that might be the cause: Error 2191 - You can't set the recordsource property after printing has started | Access World Forums (access-programmers.co.uk) However, I'm not sure how to do this: "The solution was to create a global variable as a flag to indicate the main report was...
Top Bottom