Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    178

    Unanswered: query wont in code

    i have 2 querys both querys are picking the dates from the same form. if i run each query they will work. but when i run the this code i get an error 3061 in this line

    Set MyRS = MyDB.OpenRecordset("qryEmailMovieReport", dbOpenSnapshot)

    does any1 know what i am doing wrong

  2. #2
    Join Date
    Feb 2004
    Location
    New Zealand
    Posts
    1,469
    Provided Answers: 10
    if the qryEmailMovieReport query pointing to the form then when it won't work

    so what I would do is

    take the where part out of the qryEmailMovieReport

    the line above the SqL



    SQL=""
    SQL= SQL & " Select qryEmailMovieReport.*"
    SQL= SQL & " From qryEmailMovieReport"
    SQL= SQL & " Where qryEmailMovieReport.feild = '" & me.feildnameonform & "';"
    or if a number

    SQL= SQL & " Where qryEmailMovieReport.feild = " & me.feildnameonform & " ;"

    then

    Set MyRS = MyDB.OpenRecordset(SQL, dbOpenSnapshot)

    ...
    ...
    ...
    hope this help

    StePhan McKillen
    the aim is store once, not store multiple times
    Remember... Optimize 'til you die!
    Progaming environment:
    Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010
    VB-NET based on my own environment started 2007
    SQL-2005 based on my own environment started 2008
    YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
    DONT WORRY ABOUT THOSE WHO TALK BEHIND YOUR BACK
    THEY'RE BEHIND YOU FOR A REASON

  3. #3
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Here's the source of your problem:

    http://support.microsoft.com/default...b;en-us;209203
    Paul

Posting Permissions

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