如何在另一个表单上重新查询另一个对象? [英] How to requery another object on another form?

查看:85
本文介绍了如何在另一个表单上重新查询另一个对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎无法理解这一点。我想在创建cboList的表中添加新信息之后重新查询另一个表单。


所以,我有一个有销售人员的组合框,我有另一个表单这让我可以将销售人员添加到所有销售团队的表格中。 (姓名,号码等......)


但是当我打开主表单(使用Sales Personnel的组合框)然后打开表单添加新成员时,或者编辑成员,我似乎无法制作一段代码来重新查询主要的组合框。


我试过以下但没有成功......

I can''t seem to get this figured out. I am trying to requery another form after adding new information to a table that a cboList is created from.

So, I have a combo box that has Sales personnel, and i have another form that lets me add sales personnel to the table of all the sales team. (Name, number, etc...)

But when I open up the main form (with the combo box of Sales Personnel) and then open the form to add new members, or edit the members, I can not seem to make a piece of code that will requery the main combo box.

I have tried the following with no success...

展开 | 选择 | Wrap | 行号

推荐答案

试试这个......

Try this ...

展开 | 选择 | Wrap | 行号



试试这个...

Try this ...

展开 | 选择 | Wrap | 行号



现在我有另一个错误。


我收到一条错误消息,说这不能在数据库的当前视图中完成。 (因为销售窗口没有打开。)


我会在这放入什么类型的代码?


我会放置吗? 错误继续 ??


我不太清楚在这个上做什么,但是这个代码确实有效,但只有当那个窗口打开时才有效。如果它没有打开,我会收到错误。
Now I have another error.

I get an error message saying that this can not be done within the database''s current view. (Because the "Sales" window is not open.)

What type of code would I put in this?

Would I place an "On Error Continue" ??

I''m not too sure what to do on this one, but that code did work, but only if that window is open. If it''s not open, I get an error.



你是对的,销售表格必须开放才能运作。一种选择是打开表单并在之后关闭它。

You''re right the Sales form has to be open for it to work. One option would be to open the form and close it after.

展开 | 选择 | Wrap | 行号


这篇关于如何在另一个表单上重新查询另一个对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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