|
-
Nov 11th, 2000, 10:58 PM
#1
Thread Starter
Lively Member
Hello
Tools:
Crystal Reports 4.6, VB 6.0 and Access 97
Table Name:
Expense
Times
Here is my sql statement for one table
db.Execute "SELECT * INTO Expense IN '" & strTempDb & "' FROM Expense " & _
"WHERE StartDate >= #" & Format(datDate3, "mm/dd/yyyy") & "# " & _
"AND EndDate <= #" & Format(datDate4, "mm/dd/yyyy") & "#"
Here I am querying records for those two dates that are entered... This is one table... I want to be able to add a second table to this statement.... where I am using different text boxes instead
The dates from each table are related.. I am trying to place the results into a TEMP.mdb and then my crystal report displays the data from that temp.mdb
Can anyone help me with my statement to search from two tables in the same db????
How can I add a third criteria to this statement
db.Execute "SELECT * INTO Times IN '" & strTempDb & "' FROM Times WHERE DatePerformed>=#" & Format(datDate3.Value, "dd/mm/yyyy") & "# AND DatePerformed<=#" & Format(datDate4.Value, "dd/mm/yyyy") & "#"
I want to add the field (ProjectCode) and the control )DataCombo1.text
Help is greatly appreciated!!!!
Steve
-
Nov 12th, 2000, 12:19 AM
#2
Addicted Member
1. Can't you use two separate statments to obtain the first goal?
2. Can't you use another AND/OR criterion and, if necessary, a pair of parentheses to add a third?
3. If you don't need to preserve the temporary database you need not build it. Just use recordsets.
[Edited by xmin on 11-12-2000 at 12:30 AM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|