Hi All.
I tried to run report and used such code:
What is my problem?
Thanks.
I tried to run report and used such code:
Code:
Private Sub lblDelivery_Click(Sql As String)
Sql = "SELECT Receiving.ReceiveID, Receiving.Date, Devices.Device, qLocation.Location, Receiving.Amount" & _
"FROM Devices" & _
"INNER JOIN Receiving" & _
"ON Devices.DeviceID = Receiving.DeviceID)" & _
"INNER JOIN qLocation ON Receiving.ReceiveID = qLocation.ReceiveID" & _
"WHERE Receiving.Date Between [Enter First Date] And [Enter Last Date]" & _
"ORDER BY Devices.Device, Receiving.Date;"
stDocName = "rDelivery"
DoCmd.OpenReport stDocName, acPreview
DoCmd.Maximize
DoCmd.RunSQL Sql
End Sub
Thanks.