Minggu, 08 September 2013

Re: [MS_AccessPros] Re: Error 3061 Too Few Parameters

 

Thanks Graham.
What I wanted to do with strSQL is to filter out the records whose dates qualify, and then populate the ListView with that set of records.
Is there a better way to do that, in your judgment?
Patty


On Sun, Sep 8, 2013 at 11:48 PM, Graham Mandeno <graham@mandeno.com> wrote:
 

Hi Patty

 

I'm glad you sorted out the 3061 error.  My guess is that the Domain string was referring to fields that were not in the table(s)/query(s) in your FROM clause.

 

Now, you say you cannot get your strSQL to sort.  Well firstly, it does not contain an ORDER BY clause, so there is nothing in it to specify a sort order.

 

More importantly though,, you are not actually USING strSQL for anything.  The SQL statement you are using for a Recordset to load your ListView is the Domain string that is being passed as an argument.  What exactly do you want to do with strSQL?

 

Best wishes,

Graham

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Patricia Mapes
Sent: Monday, 9 September 2013 13:28
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Re: Error 3061 Too Few Parameters

 

 

I resolved the

Error 3061 issue, although I still cannot get my strSQL to sort.

 

Your insights were very helpful.

Thank you,

Patty

 

On Sun, Sep 8, 2013 at 12:09 PM, Patricia Mapes <patty.mapes@gmail.com> wrote:

I have the following code, failing on the last line:

 


  DateOfVisit = CDate(Forms!Select_Diagnosis![VisitList])
            
         
  Set db = CurrentDb
  Set rs = db.OpenRecordset(Domain)
             'select all events
   
  strSQL = "SELECT * FROM [diagnosis] WHERE (CDate(StartDate)) >" & DateOfVisit

 

 

If someone can see my error, I will be very grateful.

 

Thank you,

 

Patty
--
Patricia Mapes

 




--
Patricia Mapes

 




--
Patricia Mapes

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (30)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar