This article was previously published under Q198462
Moderate: Requires basic macro, coding, and interoperability skills.
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
Query: QryEval
----------------------------------------
Type: Select Query
Field: OrderID
Table: Orders
Field: OrderDate
Table: Orders
Criteria: =Eval("Forms!FrmEval!Text0")
Form: FrmEval
-----------------------------
Caption: Eval Form
Text box:
Name: Text0
Command button:
Name: Command0
Caption: Run Query
OnClick: [Event Procedure]
Private Sub Command0_Click()
Dim MyDB As Database
Dim MySet As RecordSet
Set MyDB = CurrentDb()
Set MySet = MyDB.OpenRecordSet("QryEval")
MySet.MoveFirst
MsgBox MySet!OrderID
MySet.Close
End Sub
Keywords: KB198462, kbprogramming, kbhowto