将记录从表单写入单独的表 [英] Writing records to a seperate table from a form

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

问题描述

好的我有一个从几个不同的表调用的表单,你使用下拉框选择你的选项,然后在表单的4个文本框中显示你选择的内容每个文本框是每个文本框的结果下拉菜单。


现在我想要一个按钮,当点击它时将获取这4个文本框中的值并将其写入表格并将文件导出到制表符分隔的文本文件?


如果有人能帮助我或指出我正确的方向,我们将不胜感激。


干杯

Ok I have a form which calls from a few different tables and you use the drop down box to select your options which then shows what you have selected in 4 text boxes in the form each text box is the result from each of the drop down menus.

Now I want to have a button that when clicked will take the values from those 4 text boxes and write it to a table and export the file to a tab delimited text file?

If anyone could help me or point me in the right direction it would be greatly appreciated.

Cheers

推荐答案


好​​的我有一个从几个不同的表调用的表单,你使用下拉框选择你的选项,然后显示你的内容已经在表单中的4个文本框中选择了每个文本框是每个下拉菜单的结果。
Ok I have a form which calls from a few different tables and you use the drop down box to select your options which then shows what you have selected in 4 text boxes in the form each text box is the result from each of the drop down menus.



当你累或醉的时候,你不想读它!

我明天再来看看看看我是否能理解它。

You don''t want to read that when you''re tired or drunk!
I''ll look again tomorrow to see if I can make any sense of it.


是的,我只是自己重新阅读它,这非常令人困惑!


我是什么在我的表单上有4个组合框,每个组合框调用不同的表来获取不同的信息。现在在表单的页脚是一组4个文本框,第一个文本框显示您在第一个组合框中选择的选项,第二个文本框显示您在第二个组合框中选择的选项等。我想成为然后能够在这些文本框中取出四个值,并通过单击按钮将其添加到表格中。


希望更有意义。


干杯
Yeah I just re-read it myself it''s pretty confusing!

What I have on my form is 4 combo boxes each calling a different table to get different information. Now at the footer of the form is a set of 4 text boxes the first text box displays the option you chose in the first combo box, the second text box displays the option you chose in the second combo box etc etc. I want to be able to then take the four values in those text boxes and add it to a table via the click of the button.

Hope that makes a bit more sense.

Cheers


要么更有意义,要么我更清醒;)。

首先,你可能不需要TextBoxes。 ComboBox的值是(通常 - 除非你有一个更复杂的,基于列的)所选项目。

其次,你需要编写代码将它们添加到表格中。

您可以在代码中创建一个生成要执行的SQL命令的字符串(INSERT INTO ...),也可以编写代码以使用ADODB或DAO函数和对象来添加数据。
Either it makes more sense or I''m more awake ;).
Firstly, you probably don''t need the TextBoxes. The value of a ComboBox is (generally - unless you have a more complicated, column based one) the selected item.
Secondly, you will need to write code to add them to a table.
You can create a string in your code that produces a SQL command to execute (INSERT INTO ...) or you can write code to use ADODB or DAO functions and objects to add the data in.


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

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