自动填充 [英] Autofill

查看:80
本文介绍了自动填充的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个数据库,可以完成我想要做的99%。

1%是我看到的一个简单的事情(它可以在asp php中完成,但我可以弄清楚如何在Access中做到这一点!。


在数据库中有一个名为table1的表,它包含了客户的详细信息

有一个名为table2的表,其中包含来自表1的两位信息的协议,客户名称和ID号(均在单独的字段中)和其他字段,例如价格同意否等。


当设置表格中的名称和ID No时,通过下拉框(取自表1)输入我想要做的是选择名称ID No box从表1中获取相关ID No并添加它来到表2.

i在Northwind ensample中看到了类似的东西(选择公司信息并且电子邮件自动添加到其框中)但尝试我可能无法找到它的完成代码?宏?或通过表达。我在我的数据库中完成的所有其他事情我通过逆向工程或通过书籍找到但是这个问题我找不到简单的解释。


这次我再次附加了DB文件我希望它能工作



附加图片
(17.4 KB,39 views)
(19.2 KB,39 views)


对,我找不到数据库中的任何信息,告诉我如何它完成了我在代码中看不到任何东西为了说明当您选择底部框中指定的人员时,如何解释或显示人员ID的输入位置,这就是提出问题的问题我知道可以做到这一点,因为我看到它在您的数据库中发生但是它是怎么回事做?在代码中的位置是用简单的英语命令: "当你选择唐纳德时,他的id不在id中没有框 你现在明白了吗?


展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


I have created a database that can do 99% of what i want to do.
the 1% is i see as a simple thing (it can be done in asp php ect but i can''t figure out how to do it in Access!).

In the data base is a table called table1 it contains details of customers
there is a table called table2 which contains agreements with two bits of information from table 1 the customers name and an ID No (both in separate fields) and other fields such as price agree No etc.

When set up both the name and ID No in table to is entered via drop down boxes (taken from table 1) what i would like to do is as the name is chosen the ID No box takes the related ID No from Table 1 and adds it to table 2.
i have seen some thing similar in the Northwind ensample (chose company info and the email is auto added to its box) but try as I might I can not find how its done code? Macro? or by expression. Every thing else I have done in my DB i have found by reverse engineering or through books but this problem I can not find a simple explanation.

I have attached the DB file again this time I hope it will work

Attached Images
(17.4 KB, 39 views)
db2.zip (26.4 KB, 36 views)

解决方案

I''m sorry you''re having problems explaining your problem, but your attached image doesn''t appear large enough on my monitor to make out any detail. And when going to unzip your attached "database" Winzip pops an error "No file to extract."

You need to try again and you need to give a written explanation of your problem, not simply posting a graphic.

Linq ;0)>

Modertor


@thanatosuk
From what I can see from your JPG file screen shot you are wanting to grab ID values of one field and maybe store in another and generally trying to get your head around the concepts of combo dropdowns and values they hold etc.

Take a look at this simple db and pull it apart to gain some extra knowledge. It is a very simple thing to demonstrate a table of people and a table of jobs where you assign a particular person to a particular job based on a query that services a form. The form has a query as its recordsource, look how that works then look at listbox and dropdowns to see if it helps you a little. Notice how you cannot click on the listboxs or combos unless a job type is selected first and so on view the simple VBA code behind the form to give you an idea.

It is not the be all and end all in design, but demonstrates a different approach to consider as you progress your learning

Welcome to Bytes :)

Attached Files
thanatosuk.zip (19.2 KB, 39 views)


Right I cannot find any info in your database that shows me how it is done there is nothing I can see in the code to show how, when you chose the Person assigned in the bottom box, that explains or shows where the person id is entered this is the problem with asking questions I know it can be done cos I see it happening in your DB but how is it done?? Where in the code is the command that will in plain English: "when you pick Donald put his id no in the id no box" do you understand now?


Expand|Select|Wrap|Line Numbers


这篇关于自动填充的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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