[英]MS Access 2016 VBA Error 2424 the expression you entered has a field, control, or property name that Microsoft Access cannot find
[英]How to write a numeric field in a VBA expression using MS Access 2016?
我有一条代码行,将字段引用为日期格式。 我需要引用另一个字段作为数字格式。
这是我的日期格式字段的代码:
Private Sub cmbsearch_Click()
Dim varFilter As Variant, stdcard_id As String, txtname As String, txtrecord
As String, strTableName As String
strTableName = "tbl01"
If IsNull(Me.stdcard_id) Then
Me.stdcard_id.SetFocus: Exit Sub
End If
varFilter = "[dateofbirth]= # "& Forms!frm_stid_name_record & "#"
....
End Sub
这是我用于数字格式字段的代码行,但是我不知道在“ =”符号后写代码
varFilter = "[std_id]="
尝试
Dim stdid As Long
stdid = Val(Forms!frm_stid_name_record)
varFilter = "[std_id]=" & stdid & " "
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.