Report Row Sources

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Access 2000.

A long time ago, when I was even more of a beginner than I am now, I would
first build and save a query and then use that query as the row source for a
report.

Now my list of saved queries is unmanageable.

Where possible, I have been able to edit my report row sources and replace
the saved queries with equivalent SQL statements and delete my saved queries.

However, I have noticed a size limit on the row source property in the
reports design view.

Is there another way for me to do this? Possibly using VBA?

Thanks in advance
 
Not necessarily a solution, but you can shorten your query length by using
aliases for the table names.

AND if your field name is unique within the query, you can drop the table
identifier on the field name.

Also, you can remove brackets [] where they aren't needed. Such as around
"legal" field and table names.

And you can remove unnecessary parentheses - you'll probably have to keep them
in the FROM clause as Access insists on them for multiple joins.

Finally, you can sort by column number vice column name. So for example,

SELECT [YourTable].[LastName], [YourTable].[FirstName]
FROM [YourTable]
WHERE ([YourTable].[SSN] = "123456789")
ORDER BY [YourTable].[LastName], [YourTable].[FirstName];

Can become

SELECT LastName, FirstName
FROM YourTable
WHERE SSN = "123456789"
ORDER BY 1,2
 
Back
Top