我的数据库中有一个表,我有一个表单,允许用户将记录添加到数据库中。其中一个用户请求是能够复制以前记录的字段,这将有助于用户在数据输入期间节省时间。
Dim Identi As Long
Identi = DMax("ID", "Video_Log_Table")
DoCmd.GoToRecord , , acNewRec
DriveName = DLookup("DriveName", "Video_Log_Table", "ID=" & Identi)
' Location = DLookup("Location", "Video_Log_Table", "ID=" & Identi)
' Location = DLookup("F1", "Table1", "ID=" & Identi)
' composition = DLookup("composition", "Video_Log_Table", "ID=" & Identi)
' composition = DLookup("Video_Log_Table.composition.value","Video_Log_Table", "ID=" & Identi)
' movement = DLookup("movement", "Video_Log_Table", "ID=" & Identi)
FileLocation = DLookup("FileLocation", "Video_Log_Table", "ID=" & Identi)
description = DLookup("description", "Video_Log_Table", "ID=" & Identi)
NotablePeople = DLookup("NotablePeople", "Video_Log_Table", "ID=" & Identi)
ShootDate = DLookup("ShootDate", "Video_Log_Table", "ID=" & Identi)
Shooter = DLookup("Shooter", "Video_Log_Table", "ID=" & Identi)
TicketNumber = DLookup("TicketNumber", "Video_Log_Table", "ID=" & Identi)
ClipNumber = DLookup("ClipNumber", "Video_Log_Table", "ID=" & Identi)
NotablePeople.SetFocus
ClipNumber.SetFocus
未评论的所有内容都有效。注释的代码行不起作用。不起作用的代码行是多值字段。即在输入期间,您可以选择多个选项。
不确定发生了什么。多值字段的选项存储在值列表中。