Minggu, 08 September 2013

Re: [MS_AccessPros] Error 3061 Too Few Parameters

 

Thanks John.
 
That did indeed solve the error, but it isn't selecting the correct records.
I've tried it both with and without the table name (diagnosis).
[StartDate] is a text field.  Is this not the correct way to resolve the date issue for the purpose of comparison?
 
 strSQL = "SELECT * FROM [diagnosis] WHERE (CDate([diagnosis].[StartDate])) >" & DateOfVisit
 
Patty


On Sun, Sep 8, 2013 at 1:17 PM, John Viescas <JohnV@msn.com> wrote:
 

Patty-

 

Put brackets around [StartDate] … assuming you have a field called StartDate in diagnosis.

 

John Viescas, Author

Microsoft Access 2010 Inside Out

Microsoft Access 2007 Inside Out

Microsoft Access 2003 Inside Out

Building Microsoft Access Applications

SQL Queries for Mere Mortals

http://www.viescas.com/

(Paris, France)

 

 

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Patricia Mapes
Sent: Sunday, September 08, 2013 6:10 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Error 3061 Too Few Parameters

 




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

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

__,_._,___

Tidak ada komentar:

Posting Komentar