wizcow
Registered User.
- Local time
- Today, 00:01
- Joined
- Sep 22, 2001
- Messages
- 236
I am trying to get the results of this sql statement into a msgbox.
I just get the statement repeated in the msgbox.
What I want is the result of the sql statement.
What am I missing here?
Thanks
Tom
I just get the statement repeated in the msgbox.
What I want is the result of the sql statement.
Code:
Private Sub cmdCalc_Click()
Dim strSQL As String
strSQL = "SELECT TOP 1 Inventory.StockTakeDate" & _
"FROM Inventory INNER JOIN InventorySub ON Inventory.InventoryID = InventorySub.InventoryID" & _
"WHERE (InventorySub.ItemNo) = [Forms]![Part]![ItemNo]" & _
"ORDER BY Inventory.StockTakeDate DESC;"
MsgBox strSQL
End Sub
What am I missing here?
Thanks
Tom