MS Access - 使用VBA使用父表中的潜在客户ID在子表中创建并填充新记录 [英] MS Access - Create and populate a new record in a child table with the lead ID from the parent table using VBA

查看:99
本文介绍了MS Access - 使用VBA使用父表中的潜在客户ID在子表中创建并填充新记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个完整的访问/ VBA新手,但试图解决问题。

I am a complete access/VBA novice but trying to figure things out.

我有2个表tblcustomer和tblcases。

I have 2 tables tblcustomer and tblcases.

在显示tblcustomer信息的表单上,我想显示一系列按钮,当按下它时,它将在tblcases中创建一个新记录,其中填充了当前显示的tblcustomer的潜在客户ID以及特定于该按钮的信息。

On a form which displays tblcustomer information i want to display a series of buttons which when pressed it will create a new record in tblcases populated with the lead ID from tblcustomer that is currently displayed and infomation specific to that button.

tblcustomer布局了LeadID,名称,地址等

tblcustomer is layed out LeadID, name, address, etc

tblcases布局了LeadID,tblcustomerLead ID,casetype

tblcases is layed out LeadID, tblcustomerLead ID, casetype

任何帮助都会有很大帮助

any help would be much apreciated

推荐答案

您可以创建一系列APPEND查询(INSERT INTO)并使用按钮执行它们。

You can create a series of APPEND queries (INSERT INTO) and execute them using your buttons.

希望它有帮助......

Hope it helps...

这篇关于MS Access - 使用VBA使用父表中的潜在客户ID在子表中创建并填充新记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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