I have the following code which will return all Airline Companies if combobox "cboAirlineCompany" on a form is left blank.
The results of the query returns the expected results however, if I run this in a report, the first page is blank as if it was using NULL from the blank combobox. Then, all Airline Companies appear on the following pages.
any thoughts?
Here is the code from the combobox
The results of the query returns the expected results however, if I run this in a report, the first page is blank as if it was using NULL from the blank combobox. Then, all Airline Companies appear on the following pages.
any thoughts?
SQL:
PARAMETERS [TempVars]![tmpEndDate] DateTime;
SELECT tblBalance.TransactionDate, tblBalance.AirlineCompanyLookup, tblBalance.Balance AS PrvBalance, (Select Sum(a.Balance)
From tblBalance as a
Where a.TransactionDate = [TempVars]![tmpEndDate]-1) AS RunPrvBalance
FROM tblBalance
INNER JOIN tblAirlines ON tblBalance.AirlineCompanyLookup = tblAirlines.AirlineID
WHERE (((tblBalance.TransactionDate)=TempVars!tmpStartDate-1)
And ((tblBalance.AirlineCompanyLookup)=Nz(Forms!frmReportBuildFuelTrans!cboAirlineCompany,[AirlineCompanyLookup])));
Here is the code from the combobox
SQL:
SELECT tblAirlines.AirlineID, tblAirlines.AirlineCompany
FROM tblProviders
INNER JOIN tblAirlines
ON tblProviders.ProviderID = tblAirlines.ProviderNameLookup
WHERE (((tblAirlines.AirlineStatus)="Active"))
ORDER BY tblAirlines.AirlineCompany
UNION SELECT Null,"(All)" FROM tblProviders;