[AccessD] Opening Recordset Error

Neal Kling nkling at co.montgomery.ny.us
Mon Jun 2 10:12:05 CDT 2003


This line is also problematic.

(((tblInvoiceFunding.InvoiceID)=[Forms]![frmInvoiceDataEntry]![txtINVOIC
E_ID]))"

It is putting the actual text
"[Forms]![frmInvoiceDataEntry]![txtINVOICE_ID]" as part of the sql
string when you want the value

(((tblInvoiceFunding.InvoiceID)=" &
Forms!frmInvoiceDataEntry!txtINVOICE_ID & "))"

Neal Kling
Lotus, isn't that some kind of fancy flower?


-----Original Message-----
From: Nancy Lytle [mailto:nancy.lytle at auatac.com]
Sent: Monday, June 02, 2003 11:07 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Opening Recordset Error


Nope, that's not working either, same error message, and the recordset
is
listed as "Expression not defined in context" or as "Out of Context".

Nancy L

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Gustav Brock
Sent: Monday, June 02, 2003 10:22 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] Opening Recordset Error


No Lembit and Nancy, it's the brackets:

>> strFunded = "SELECT Sum(tblInvoiceFunding.FundsFromCode) AS Funded"

/gustav


> semicolon at the end?

> Lembit Soobik

> ----- Original Message -----
> From: "Nancy Lytle" <nancy.lytle at auatac.com>
> To: "Accessd" <accessd at databaseadvisors.com>
> Sent: Monday, June 02, 2003 3:56 PM
> Subject: [AccessD] Opening Recordset Error


>> Can someone see what I am missing here?  I keep getting the error:
"Too
few
>> Parameters: Expected 1"
>>
>> Dim intCounter As Integer
>> Dim rstFunded As DAO.Recordset
>> Dim dbFunded As DAO.Database
>> Dim strFunded As String
>> strFunded = "SELECT Sum([tblInvoiceFunding.FundsFromCode]) AS Funded"
>> strFunded = strFunded & " , tblInvoiceFunding.InvoiceID FROM
>> tblInvoiceFunding GROUP BY tblInvoiceFunding.InvoiceID"
>> strFunded = strFunded & " HAVING
>>
(((tblInvoiceFunding.InvoiceID)=[Forms]![frmInvoiceDataEntry]![txtINVOIC
E_ID
>> ]))"
>> Set dbFunded = CurrentDb()
>> Set rstFunded = dbFunded.OpenRecordset(strFunded, dbOpenDynaset,
dbReadOnly)
>>
>> TIA,
>> Nancy L

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list