Record source - "No fields available to be added to the current vi

D

DBTech1

Hello,

I put together a test SQL stored procedure, and set it as the Record Source
for a new form in my Access ADP file, but when I click on the "Add Existing
Fields" button, I am presented with a message stating:

No fields available to be added to the current view.
The current recordsource may be invalid (for example, it may contain an
invalid join expression), or there was some other problem gathering
recordsource information for this object.

Below is a copy of the code, which runs fine and produces correct results in
Query Analyer. Can anyone see what is wrong? Does Access have problems with
temp tables? I'm stumped...

==================================================

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

---

ALTER proc pTest
as
set nocount on

---

create table #tblTest (xField1 varchar(10), xField2 int)

insert into #tblTest (xField1, xField2) values ('aaa', '1')
insert into #tblTest (xField1, xField2) values ('bbb', '2')
insert into #tblTest (xField1, xField2) values ('ccc', '3')

select xField1, xField2 from #tblTest

drop table #tblTest

---

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

==================================================
 

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