VB问题 [英] VB question

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

问题描述

是否可以在VB中对此进行编码...


我希望在搜索表单上有一个按钮,一旦用户找到他们要查找的记录就可以选择我想将该记录导入到另一个表中。


我在考虑在VB中完成一个SQL插入语句....

Is it possible to code this in VB...

I want to have a button on a search form that once the user finds the record they are looking for has the option to i guess import that record into another table.


I was thinking of maybe a SQL insert statment done in VB....

推荐答案

是的,您可以使用DoCmd.RunSQL执行此操作插入...
Yes, you can do this with DoCmd.RunSQL "Insert Into ..."


我很难用这个SQL代码并让它工作......


i有一个表,我需要从(Tracker)中提取表格,并且id喜欢将记录从那里复制到另一个表SRMisc中。


我遇到的问题是每个表中的列名不一样。在Tracker表中,它们只是一个字母和数字.... EX。 z6,z7,z8,在SRMisc表中,它们实际上具有描述,注释等名称。另一个问题是Tracker表是一个只有就绪特权的链接表。所以我做了一个名为traker的创建表查询(刚刚省略了C),所以我可以编辑数据,但仍然无法让它工作。


我想做什么。 ..i想从我的表单中搜索traker中的记录,然后当找到记录时,点击一个按钮,将记录复制到我的SRMisc表中。


我可以这样做,因为数据名称不匹配? (我在想它不会给我带来各种不同的错误)
I''m having a really hard time with this SQL code and getting it to work...

i have a table that i need to pull in formation from (Tracker) and id like to copy a record from there into another table SRMisc.

The problem im running in to is that the column names are not the same in each table. In the Tracker table they are just a letter and number.... EX. z6, z7 ,z8, and in the SRMisc table they actually have names like Description, Comments. Another issue is that the Tracker table is a linked table with Ready only privlegages. So i did a create table query called traker ( just left out the C) so i could edit the data, and still cannot get it to work.

what i woud like to do...i would like to search for a record in traker from my form, then when the record is found, hit a button that is going to copy the record into my SRMisc table.

Can i do that since the data names do not match up? (I''m thinking no beucase it keeps giving me all different kinds of errors)



我可以这样做,因为数据名称可以不匹配? (我在想它不会给我带来各种不同的错误)
Can i do that since the data names do not match up? (I''m thinking no beucase it keeps giving me all different kinds of errors)



嗨!


1。无论名称是否匹配,INSERT INTO语句都需要匹配的相应字段的类型。

2.在Query Builder中构建必要的追加查询,运行它以检查它是否正常工作。然后将Builder提供的SQL语句复制/粘贴到您的代码中进行必要的更正。


祝你好运

Hi!

1. INSERT INTO statement needs the type of corresponding fields to match, no matter whether the names match or not.
2. Build a necessary append query in Query Builder, run it to check whether it works properly. Then copy/paste the SQL statement offered by Builder to your code making necessary corrections.

Good luck


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

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