
03-01-2003, 06:50 AM
|
 |
Code Factory
Retired Moderator * Expert *
|
|
Join Date: Jan 2001
Location: Montreal, Ca.
Posts: 5,565
|
|
|
Field1 would be a Field in the recordset, Textbox1 would be a textbox on the VB form.
The critieria can look something like this...
sCriteria = "Field1 = '" & Textbox1 & "' AND Field2 = " & val(textbox2.text)
Field1 one being text based and Field2 being of numeric data type (notice the single quotes surrounding the text based data)
And you need to bind the report to a table or query, you can do it at run-time or design-time... by either puting the table/query name or a full SQL Select statement....
DoCmd.RecordSource = "Select * From myTable"
|
|