VBA / Access中的INSERT中的WHERE子句 [英] WHERE clause in an INSERT in VBA/Access

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

问题描述

大家好,


这里有点问题,真的很感激一些帮助。


我有桌子tblBooking,我想要在其中插入一些值。


这是我的代码到目前为止(我有一些多余的Dims,但我认为它们没有造成任何问题)

Hi Guys,

Bit of a problem here, would REALLY appreciate some help.

I have a table tblBooking, and I want to insert a number of values into it.

This is my code so far (I have a few redundant Dims, but I don''t think they are causing any problems)

展开 | 选择 | Wrap | 行号

推荐答案

事实上,阅读它,我知道代码是错的,


用于阅读表格的地方......比如更新地点,而不是我想要的地方!


哈哈,有人可以帮帮我吗?我想我需要一个循环。
Infact, reading that, I know the code is wrong,

the WHERE would be for reading the table... like update where, not what I want!

Haha, could anyone help me out? I assume I need a loop here.


我再次,对不起!


(我不是为了向上移动或其他任何东西,只是继续想办法更好地处理我的查询!)


这里有一些Pseudocode:


i)读入gangNo

ii)请求详细信息输入每条记录开始时间,开始日期

iv)然后对于每个拥有该帮的用户,在tblBooking中创建一条记录包括:


UserID(来自tblUser);的JobId = QUOT; GANG英寸; startTime(读入);开始日期(读入); bookingStatus =" Active"


我根本不知道怎么做!我的截止日期是星期五早上。


再次,您可以在www.cmdclan.co.uk/Temp/jr_system.mdb上查看BD


它是frmGangBook上的按钮我想要这个


再次干杯,sry回复我自己的主题:S
Me again, sorry!

(I''m not doing this to move up or anything, just keep thinking of ways to work my query better!)

Here is some Pseudocode:

i) Read in gangNo
ii) Request Details to be input with each record Start Time, Start Date
iv) Then for each user that has that gang no, create a record in tblBooking Including:

UserID (from tblUser); JobId="GANG"; startTime (read in); Start Date(Read In); bookingStatus="Active"

I just have no idea how to do this! and my deadline is friday morning.

again, you can DL the BD at www.cmdclan.co.uk/Temp/jr_system.mdb

it is the button on frmGangBook that I want this to

Cheers again, sry for replying to my own thread :S



大家好,


这里有点问题,真的很感激一些帮助。


我有一个表tblBooking,我想在其中插入一些值。


这是我的代码到目前为止(我有一些多余的Dims,但我不认为他们造成任何问题)

Hi Guys,

Bit of a problem here, would REALLY appreciate some help.

I have a table tblBooking, and I want to insert a number of values into it.

This is my code so far (I have a few redundant Dims, but I don''t think they are causing any problems)

展开 | 选择 | 换行 | 行号


这篇关于VBA / Access中的INSERT中的WHERE子句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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