Results 1 to 8 of 8
  1. #1
    Join Date
    Feb 2006
    Posts
    26

    Unanswered: DoCmd.sendobject

    I have a recordset, rs, that I want to send, however it doesn't like my syntax...do I need to define it as something else?

    it didn't like the rs in:

    DoCmd.SendObject acSendQuery, rs, acFormatHTML, rs![nmc email address], , , eSub, eText, False

    should rs be categorized as something else?

  2. #2
    Join Date
    Feb 2006
    Posts
    26

    Please help docmd.sendobject



    I need to send a query that is based on results given in my code:


    DoCmd.SendObject acQuery, rs, acFormatHTML, rs![nmc email address], , , eSub, eText, False

    where Set rs = CurrentDb.OpenRecordset(strSQL) was defined previously

    I get a an expression you entered is the wrong data type for one of the arguments? How should I define the variable that should be the query result?

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Threads merged. This also refers to:
    http://www.dbforums.com/showthread.php?t=1609132

    Betty - please keep the threads down to one per question

    How about we keep this thread going and leave the one I have linked to?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    As I recall you can simply use the query name where you have used rs.

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Feb 2006
    Posts
    26
    thanks pootle

    The query is defined in a strSQL -- there is no name for it. how would I define a name for it I guess is what I'm asking

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    What is the content of strSQL?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  7. #7
    Join Date
    Feb 2006
    Posts
    26
    strSQL = "Select * from [NMC: email test]where [nmc: email test].[nmc email address]='" & email & "'"

  8. #8
    Join Date
    Mar 2006
    Posts
    163
    Betty

    As far as I'm aware you can't send a recordset like this.

    Why not create a query definition based on the SQL?

    Then you can send the query you created, then if needed delete the query.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •