从表中重新记录记录 [英] Retrival of records from a table

查看:86
本文介绍了从表中重新记录记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我是使用Access数据库的新手。我在访问中创建了一个包含多个字段的表,如(字母类别,字母类型,字母名称等),使用表单并在表格中插入少量记录。现在我想知道如果我在我的表单中为字母名称提供的文本字段中输入现有的字母名称(已经放在记录中),我需要检索该特定记录的所有其他字段。
<例如,
说,我的记录有

字母类别:intr

字母类型:haaad

字母名称:abcdef


现在,如果我在表单窗口中键入abcdef作为字母名称,则表单窗口应显示字母类型和字母名称的值。

我该怎么做

Hi I am new using Access database. I have created a table with several fields like (letter categrory, letter type, letter name etc) in access, using forms and inserted few records in my table. now I wanted to know like if i type in an existing letter name(already placed in a record) in the text field provided for letter name in my form, I need to retrive all other fields of that particular record.

say for example, my record has
Letter categrory : intr
Letter type : haaad
Letter Name : abcdef

Now if i type in abcdef for letter name in my forms window, the forms window should display values of letter type and letter name.
how do i do this

推荐答案

@shreeks


这是一个链接可能对你有用。

http:// www.allenbrowne.com/casu-22.html


如果您不想阅读整本书,这里有一些建议。


如果您的用户必须输入要搜索的确切字母名称,则可以创建子窗体以显示记录并将其链接主字段设置为输入文本框,将子字段字段设置为LetterName 。这有点限制。


另一种方法是让用户键入一个值并单击搜索按钮。搜索按钮中的代码如下:
Well, here are some suggestions if you don''t want to read a whole book.

If you are ok with your user having to input the exact letter name to search, you can make a subform to display the records and set its Link Master Fields to the input textbox and the Link Child Fields to LetterName. This is a bit restrictive.

Another way would be to have the user type in a value and click a search button. The code in the search button is like:
展开 | 选择 | Wrap | 行号


我创建了另一个表格,带有字母名称的第二个表格,并制作了我的原始表格,字母类型,字母类别和字母名称作为子表格。我的信件名称字段实际上被设置为主键。现在我在表格中输入了几个值,我可以使用我的第二个表格通过输入表格中已存在的字母名称来检索表格的值,并且我能够看到子表单中的所有值。

让我们说我的桌子有

字母名称字母类型字母类别

andy aaa 123

sam bbb 333

rob ccc 324

当我在字母名称中输入''andy''时我能看到''aaa''和''123' '在我的子表格中。
但现在我想在子表单中编辑这些数据。我想直接更改子表单中的aaa和123值,这个更改应该反映在我的表格中。

我可以这样做,还是有任何我可以用来执行这项工作的其他方法吗?
I Created another form say 2nd form with Letter name, and made my original form with letter type, letter category and letter name as the subform. Acutually my Letter name field is set as primary key. Now i entered few values in the table and I am able to retrive the values of the table using my 2nd form by entering the letter name already existing in my table and I am able to see all the values in the subform.
let us say my table has
Letter name letter type letter category
andy aaa 123
sam bbb 333
rob ccc 324

when i enter ''andy'' into the letter name i am able to see ''aaa'' and ''123'' in my subform.
but now i want to edit this data in my subform. I want to change ''aaa'' and ''123'' values in my subform directly and this change should reflect in my table.
can I do that, or is there any other method that i can work on that performs this job??


这篇关于从表中重新记录记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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