在数据表视图中输出存储过程而不使用表单 [英] Output stored procdure in datasheet-view without using a form

查看:67
本文介绍了在数据表视图中输出存储过程而不使用表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,


如何显示SP的结果记录。

我可以通过双击SPname来完成?

但是怎么做代码。


我想要以下界面

在我的表格中用户

1选择一个SP(组合框显示用户名)

2添加相关参数

3然后点击显示结果按钮


但是.execute命令没有显示记录。


我想要相同的输出,因为你需要点击

对象窗口中的SPname。


谢谢,


Filip

解决方案

< blockquote> Hi Filip,


我假设你使用的是Access ADP。在ADP中,您可以创建一个

表单,并将表单的RecordSource基于SP。只需从表单

设计器的字段列表中添加sp返回到Form的列

。将表单放在数据表视图中。你可以把它变成一个子表单

并从一个mainform中显示它。


如果你没有使用ADP而是mdb,那么你使用ADO生成一个

记录集。将该记录集写入表格并将表格基于

表格。


Rich


***通过开发人员指南 http://www.developersdex.com 发送***


DoCmd.OpenStoredProcedure" SpGetFFDBAAccounts"


有两个可选参数:


AcView - > ; acViewNormal || acViewPivotChart || acViewPivotTable ||

acViewPreview



DataMode - > acEdit || acAdd || AcReadOnly。


我还没有用过这些。数据模式可能很有用。


DoCmd.OpenStoredProcedure" Spxxxxx"再次询问参数。

我想打开SP而不再询问参数值,只需

从formcontrols中选择它们。

In一个表我用每个SP存储与每个SP相关的参数。

我希望能够在不改变界面的情况下添加新的SP,

,不为每个新SP添加表格


" Lyle Fairfield" < LY *********** @ aim.com>在消息中写道

新闻:11 ********************** @ i39g2000cwa.googlegr oups.com ...

DoCmd.OpenStoredProcedure" SpGetFFDBAAccounts"

有两个可选参数:

AcView - > acViewNormal || acViewPivotChart || acViewPivotTable ||
acViewPreview

DataMode - > acEdit || acAdd || AcReadOnly。

我没有用过这些。 Datamode可能很有用。



Dear All,

How can I show the resultrecords of a SP.
I can be done by doubleclick the SPname?
But how to do it by code.

I want the following interface
In my form the user
1 selects a SP (combobox showing a userfrinly name)
2 adds the related parameters
3 and then click the show result-button

but the .execute command doen''t show teh records.

I want the same output as you have doublclicking the SPname in the
objectwindow.

Thanks,

Filip

解决方案

Hi Filip,

I will assume you are using an Access ADP. In the ADP you can create a
form and base the Form''s RecordSource on the SP. Just add the columns
that the sp returns to the Form from the field list in the Form
designer. Place the form in datasheet view. You can make it a subform
and show it from a mainform.

If you are not using an ADP but an mdb, then you use ADO to generate a
recordset. Write that recordset to a table and base a form on that
table.

Rich

*** Sent via Developersdex http://www.developersdex.com ***


DoCmd.OpenStoredProcedure "SpGetFFDBAAccounts"

There are two optional parameters:

AcView -> acViewNormal || acViewPivotChart || acViewPivotTable ||
acViewPreview
and
DataMode -> acEdit || acAdd || AcReadOnly.

I have not used these. Datamode may be useful.


DoCmd.OpenStoredProcedure "Spxxxxx" asks the parameters again.
I would like to open the SP without asking the parametervalues again, just
pick them from the formcontrols.
In a table I store the parameters related to each SP with a usersfrindly
question.
I was hoping to be able to add new SPs without changing the interface,
without adding a form for each new SP

"Lyle Fairfield" <ly***********@aim.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...

DoCmd.OpenStoredProcedure "SpGetFFDBAAccounts"

There are two optional parameters:

AcView -> acViewNormal || acViewPivotChart || acViewPivotTable ||
acViewPreview
and
DataMode -> acEdit || acAdd || AcReadOnly.

I have not used these. Datamode may be useful.



这篇关于在数据表视图中输出存储过程而不使用表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆