双重预订问题 [英] Double Booking Problem
问题描述
我正在创建一个网球场预订系统。我正在尝试创建一个宏,不允许在同一天同时预订同一个法院。
我有以下表格和字段
tblMembers
会员ID
FirstName
姓氏
等
tblCourts
CourtID
CourtName
tblSchedule
ScheduleID
ScheduleDate
CourtID
tblSheduleDetails
SheduleDetailsID
SheduleID
会员ID
SheduleStartTime
SheduleEndTime
我试图修改类似帖子的代码但是我得到了一个取消=真的错误
I am creating a tennis court booking system. I am trying to create a macro that will not allow the same court to be booked on the same date at the same time.
I have the following tables and fields
tblMembers
MemberID
FirstName
LastName
etc
tblCourts
CourtID
CourtName
tblSchedule
ScheduleID
ScheduleDate
CourtID
tblSheduleDetails
SheduleDetailsID
SheduleID
MemberID
SheduleStartTime
SheduleEndTime
I have tried to modify the code form a similar post but am getting an error for "Cancel = True"
推荐答案
只是为了让错误知道是编译错误:变量未定义
Just to let the know the error is "Compile error: variable not defined"
尝试将代码移动到更新事件之前的表单。这是验证的正确事件。
try moving your code to the form''s before update event. that is the correct event for your validation.
正如MSeda所说,代码来自
As MSeda says, the code is from a
这篇关于双重预订问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!