如何使用在数据库中找到的记录来执行其他操作
我正在数据库中搜索一条记录,现在已找到该记录 我想知道如何使用它 例如 如果我想使用记录的名称字段来输入文本,
If rsQ.RecordCount <> 0 Then
' Found it
blnExists = True
NameTxt.Value = Name.Value
Else
MsgBox "not found"
End If
它会在这一行给我一个无效的限定符
NameTxt.Value = Name.Value
I was searching for a record in my database and now that the record is found
I want to know how can I use it
for example
if i want to use the name field of the record to put in text
If rsQ.RecordCount <> 0 Then
' Found it
blnExists = True
NameTxt.Value = Name.Value
Else
MsgBox "not found"
End If
It gives me an Invalid qualifier at this line
NameTxt.Value = Name.Value
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你说的是VBA,但没有说你正在使用哪个数据库。从上面来看,您似乎在 Access 中使用 DLookUp 会更好。否则,您可以说:
或者
BTW Name 是保留字,不应使用。
You say VBA but not which database you are using. From the above, it looks like you would be better off with DLookUp in Access. Otherwise, you can say:
Or
BTW Name is a reserved word and should not be used.