Invalid Operation

G

Gerry g

I am receiving an "Invalid Operation" error meesage at
the "Table_Entity.Open" statement. See below. What is
causing this and what has tobe done to correct it?

Thanks,

Gerry


Private Sub InputPSCode_AfterUpdate()

Dim Table_Entity As ADODB.Recordset
Dim ClearTheField As Integer

On Error GoTo InputPSCode_AfterUpdate_Err

Set Table_Entity = New ADODB.Recordset
Table_Entity.Index = "PrimaryKey"
Table_Entity.CursorLocation = adUseServer
SQL = "SELECT [PS Property Attributes].[Product] AS
[PS ID], [PS Property Attributes].[Property Name], " _
& "[PS Property Attributes].[Type 1] AS Type FROM
[PS Property Attributes] LEFT JOIN " _
& "[Property Table] ON [PS Property Attributes].
[Product]=[Property Table].[PropNum] WHERE " _
& "((([PS Property Attributes].[Type 1])<>'GA')
And (([Property Table].PropNum) Is Null));"

Table_Entity.Open SQL, CurrentProject.Connection,
adOpenStatic, adLockOptimistic, _
adCmdTableDirect

Table_Entity.Seek Me.InputPSCode.Value, adSeekFirstEQ
 
G

Gerald Stanley

There is a conflict between the first parameter and the
fifth parameter. Try

Table_Entity.Open SQL, CurrentProject.Connection,
adOpenStatic, adLockOptimistic, adCmdText


Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top