Query parameters pop up

jlr

New member
Local time
Yesterday, 18:41
Joined
Jul 15, 2014
Messages
8
I created a query with one parameter "between and" type, however other parameters are popping up that I did not create. What could be causing this?
 
Hmm, what parameters? Also, can you post the SQL of the query, that will help detect the issue.
 
I do not know how to look at the sql. What do I do?
 
Go to the query in Design View, click the button in the upper left hand corner and select *SQL View*, highlight whatever you see there copy and then paste here. When closing if it asks you to save changes, say no.
 
SELECT tblDATASHEET.[Job ID], tblDATASHEET.[Account #], tblDATASHEET.[Acct name], tblDATASHEET.City, tblDATASHEET.State, tblDATASHEET.[Industry Code1], tblDATASHEET.[Industry Code2], tblDATASHEET.[Industry Code3], tblDATASHEET.[Date Arrived], tblDATASHEET.[Date Departed], tblDATASHEET.[Invoice #], tblDATASHEET.Technicians, tblDATASHEET.[Tech Salary], tblDATASHEET.[Salary Allocation %], tblDATASHEET.[Tech Salary Allocation Amt], tblDATASHEET.[Total Tech Salary], tblDATASHEET.SalesPerson1, tblDATASHEET.[Commission Percent], tblDATASHEET.[Commission Amt], tblDATASHEET.[Total Job Expenses], tblDATASHEET.[Invoice Total], tblDATASHEET.[Current Expense %], tblDATASHEET.[Current # of Pieces], tblDATASHEET.[Current Piece Revenue], tblDATASHEET.[Current Piece Expense], tblDATASHEET.[Last Year Invoice Amt], tblDATASHEET.[Last Year Total Expense], tblDATASHEET.[LY Expense %], tblDATASHEET.[Last Year# of Pieces], tblDATASHEET.[LY Piece Revenue], tblDATASHEET.[LY Piece Expense], tblDATASHEET.Comment
FROM tblDATASHEET
WHERE (((tblDATASHEET.[Job ID]) Between [Type the beginning Job ID:] And [Type the ending Job ID:]));
 
Okay, let's make that easier to read...

Code:
SELECT tblDATASHEET.[Job ID], tblDATASHEET.[Account #], tblDATASHEET.[Acct name], tblDATASHEET.City, tblDATASHEET.State, tblDATASHEET.[Industry Code1], tblDATASHEET.[Industry Code2], tblDATASHEET.[Industry Code3], tblDATASHEET.[Date Arrived], tblDATASHEET.[Date Departed], tblDATASHEET.[Invoice #], tblDATASHEET.Technicians, tblDATASHEET.[Tech Salary], tblDATASHEET.[Salary Allocation %], tblDATASHEET.[Tech Salary Allocation Amt], tblDATASHEET.[Total Tech Salary], tblDATASHEET.SalesPerson1, tblDATASHEET.[Commission Percent], tblDATASHEET.[Commission Amt], tblDATASHEET.[Total Job Expenses], tblDATASHEET.[Invoice Total], tblDATASHEET.[Current Expense %], tblDATASHEET.[Current # of Pieces], tblDATASHEET.[Current Piece Revenue], tblDATASHEET.[Current Piece Expense], tblDATASHEET.[Last Year Invoice Amt], tblDATASHEET.[Last Year Total Expense], tblDATASHEET.[LY Expense %], tblDATASHEET.[Last Year# of Pieces], tblDATASHEET.[LY Piece Revenue], tblDATASHEET.[LY Piece Expense], tblDATASHEET.Comment
FROM tblDATASHEET
WHERE (((tblDATASHEET.[Job ID]) Between [Type the beginning Job ID:] And [Type the ending Job ID:]));
 
The SQL did not work quite right. but I have fixed the problem. I had several fields in my report that were not in the query!
 

Users who are viewing this thread

Back
Top Bottom