Run-time error '2580' (1 Viewer)

cliftonx

Registered User.
Local time
Today, 02:06
Joined
Mar 4, 2010
Messages
27
Hello,

I'm simply trying to change the record source on a form. I'm using SQL Server as the backend. I'm assigning the record source to a stored procedure named: " "spDevsWithPartsSpec" plus passing along the parameter; "Forms!frmiimain.cboJobNumber". I'm getting the following run-time error 2580:

1656347756105.png


Here is the code that is being executed:

1656347860123.png


Thanks, for your resolutions in advance.
Clifton
 

theDBguy

I’m here to help
Staff member
Local time
Today, 00:06
Joined
Oct 29, 2018
Messages
21,467
Hi. newrs has to be declared as a recordset object. You declared rs but did not use it. You could try just using rs and get rid of newrs.

Hope that helps...
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:06
Joined
Feb 19, 2013
Messages
16,607
perhaps try

set me.recordset=qf.openrecordset
 

Gasman

Enthusiastic Amateur
Local time
Today, 08:06
Joined
Sep 21, 2011
Messages
14,267
Can a recordsource have spaces in it? :unsure:
 

CJ_London

Super Moderator
Staff member
Local time
Today, 08:06
Joined
Feb 19, 2013
Messages
16,607
the OP is creating a passthrough query, calling a stored procedure with a parameter. Not sure if treating a number as text would have an impact
 

Minty

AWF VIP
Local time
Today, 08:06
Joined
Jul 26, 2013
Messages
10,371
If it is an Integer data type then you'll get an error returned by SQL server.
It should be

sp_DevsWithPartsSpec 19050
 

Users who are viewing this thread

Top Bottom