使用DLookup [英] DLookup

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

问题描述




i我在Access中的事件代码遇到了一点麻烦..


我使用以下代码来引用Add_Video表中的可用字段,


Private Sub Combo33_BeforeUpdate(取消为整数)

如果[Forms]![Add_Video]![可用性] = False然后

MsgBox视频不可用


否则

结束如果


但是当我运行它时,我得到以下信息..


" ms访问无法找到表单添加视频中引用的宏表达式或可视化基本代码

解决方案

展开 | 选择 | Wr ap | 行号


< blockquote>感谢您的回复


i试用了你的代码但是跟着msg ..


语法错误..


我的数据库是关于一个视频租赁商店..


i有一个名为租赁的表格,当客户选择视频时,该视频可能无法使用, info位于视频表的字段可用性下..所以我要做的是创建一个事件,告诉用户当他们选择租借视频时,特定视频不可用..


对不起,我在用我的代码替换代码时意外地留下了一个支架;这就是抛出错误的原因:

展开 | 选择 | Wrap | 行号


Hi

i am having little trouble with my events code in Access..

I am using the following code to refer to the Availablilty field in the Add_Video table,

Private Sub Combo33_BeforeUpdate(Cancel As Integer)
If [Forms]![Add_Video]![Availability] = False Then
MsgBox "Video not available"

Else
End If

but as i run it i get the following msg..

"ms access cant find the form add video referred to in a macro expression or visual basic code

解决方案

Expand|Select|Wrap|Line Numbers


thanks for reply

i tried ur code but gor following msg..

syntax error..

my database is about a video rentals store..

i have a form called rentals, and in that when a customer chooses a video, the video might not be available, this info is in the video table under the field availability.. so what i am trying to do is create an event which will tell the user that a particular video is not available when they choose to rent a video..


Sorry, I accidentally left a bracket in when replacing your code with mine; that''s what is throwing the error:

Expand|Select|Wrap|Line Numbers


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

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