组合框和追加查询 [英] Combo box and Append query

查看:74
本文介绍了组合框和追加查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

之前我有构建数据库,但它们很简单。我遇到这个困难。如果有人可以帮助我,我将不胜感激。我有两个问题,我无法解决。我的第一个问题是可以创建一个组合框来列出超链接(特别是网站)。我所做的是创建一个表,其中包含一个超链接列表,这些超链接可以访问不同的网站。当我打开表格链接工作。当我尝试将列表添加到我的主窗体作为组合框时,链接不起作用。从下拉菜单中,当我尝试单击其中一个链接时,它不起作用。


我的第二个问题是我有一个主表单,其中包含用户帐号,名称,部门。在此,我想添加一个组合框(从表创建)到主窗体,它给用户提供从下拉列表中选择的选项。一旦他们从组合框中进行选择,我希望用户的帐号#,名称和他们从列表中选择的选项转移到另一个表。一旦它被转移,我希望在主表单上不再提供#,名称和部门。我认为它必须是一个附加查询,但我没有运气试图设置thais。任何帮助将不胜感激。如果我问的是疯了请告诉我。


谢谢,

JC21

Hello,
I have build databases before but they were simple ones. I am having difficulties with this one. If someone could assist me it would be greatly appreciated. I have two issues I am not able to solve. My first questions is can a combo box be created to list hyperlinks (particularly to web sites). What I have done is created a table with a list of hyperlinks which goes to different web sites. When I open the table the links works. When I try to add the list to my main form as a combo box the links do not work. From the drop down menu when I try to click on one of the links it does not work.

The second issue I have is I have a main form which contains users account number, name, dept. etc. On this I would like to add a combo box (created from a table) to the main form which gives the users option to select from the drop down list. Once they make the selection from the combo box I would like the user?s acct#, name, and the option they selected from the list to transfer to another table. Once it is transferred I would like for that acct#, name, and dept to no longer be available on the main form. I think it has to be an append query but I have had no luck trying to set thais up. Any help would be greatly appreciated. If what I am asking is crazy please let me know.

Thank you,

JC21

推荐答案


你好,

之前我有构建数据库,但它们很简单。我遇到这个困难。如果有人可以帮助我,我将不胜感激。我有两个问题,我无法解决。我的第一个问题是可以创建一个组合框来列出超链接(特别是网站)。我所做的是创建一个表,其中包含一个超链接列表,这些超链接可以访问不同的网站。当我打开表格链接工作。当我尝试将列表添加到我的主窗体作为组合框时,链接不起作用。从下拉菜单中,当我尝试单击其中一个链接时,它不起作用。
Hello,
I have build databases before but they were simple ones. I am having difficulties with this one. If someone could assist me it would be greatly appreciated. I have two issues I am not able to solve. My first questions is can a combo box be created to list hyperlinks (particularly to web sites). What I have done is created a table with a list of hyperlinks which goes to different web sites. When I open the table the links works. When I try to add the list to my main form as a combo box the links do not work. From the drop down menu when I try to click on one of the links it does not work.



在格式选项卡下的组合框属性中,列表末尾有一个名为Is Hyperlink的属性。将此设置为是

In the combo box properties under the format tab there is a property at the end of the list called Is Hyperlink. Set this to Yes



我的第二个问题是我有一个主表单,其中包含用户帐号,名称,部门。在此,我想添加一个组合框(从表创建)到主窗体,它给用户提供从下拉列表中选择的选项。一旦他们从组合框中进行选择,我希望用户的帐号#,名称和他们从列表中选择的选项转移到另一个表。一旦它被转移,我希望在主表单上不再提供#,名称和部门。我认为它必须是一个附加查询,但我没有运气试图设置thais。任何帮助将不胜感激。如果我问的是疯了,请告诉我。

The second issue I have is I have a main form which contains users account number, name, dept. etc. On this I would like to add a combo box (created from a table) to the main form which gives the users option to select from the drop down list. Once they make the selection from the combo box I would like the user?s acct#, name, and the option they selected from the list to transfer to another table. Once it is transferred I would like for that acct#, name, and dept to no longer be available on the main form. I think it has to be an append query but I have had no luck trying to set thais up. Any help would be greatly appreciated. If what I am asking is crazy please let me know.



创建一个字段,为表单可用的记录添加某种触发器。例如一个名为UnAvail的复选框字段,默认为0(未选中)。


将表单的记录源更改为仅返回UnAvail = 0的记录。


在组合框的AfterUpdate事件中输入以下内容:

Create a field to put some kind of a trigger on the records available for the form. For example a checkbox field called UnAvail and default it to 0 (for unchecked).

Change the record source for your form to only return records where UnAvail=0.

In the AfterUpdate event of the combo box put the following:

展开 | 选择 | Wrap | 行号


首先让我先说谢谢你的快速回复。我试过你提到的但是我想我可能会错过几点。对于组合框,我确实将超链接的属性更改为是,但它仍然无效。对于我用于组合框的表,我有2个字段,一个是Comp的名称。 (数据类型:文本),另一个是地址(数据类型超链接)。我已经尝试了两个作为组合框的选定字段,但它不起作用。

如果我遗失了什么请告诉我。


对于第二个问题,我不得不说我对复选框并不熟悉。如何将复选框字段设置为默认值为0?对于表单,Record Source是一个获取信息的查询。如何将记录源更改为仅返回UnAvail = 0的记录。我必须在我理解的AfterUpdate事件中输入的代码。您可以给我的任何其他信息我很感激。感谢您的时间。
First let me start by saying thank you for quick reply. I tried what you mentioned but I think I may be missing a few points. For the Combo box I did change the property for the hyperlink to Yes but it still did not work. For the table I use for the combo box I have 2 fields one is the name of the Comp. (data type: text), the other is the address (Data type hyperlink). I have tried both as the selected field for the combo box but it did not work.
If I am missing something please let me know.


For the second question I have to say I am not that familiar with checkboxes. How do I set the checkbox field to default to 0? For the form the Record Source is a query where it is getting the info. How to I change the record source to only return records where UnAvail=0. The code I have to enter in the AfterUpdate event I understand. Any additional info you can give me I appreciate. Thanks for your time.


要设置复选框的默认值,只需在设计视图中打开表单;选中复选框;输入默认值属性中所需的值。

NB。这需要一个布尔值 - True或False(或Yes; No etc),但不要求引用。
To set the default value for a checkbox simply open the form in design view; select the checkbox; enter the value required in the ''Default Value'' property.
NB. This expects a boolean value - True or False (or Yes; No etc) all work but DON''T require quotes.


这篇关于组合框和追加查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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