I have been informed that I can use the ':' operator to input alias names for the fields of a query. That is true and works.
What if I manually execuite an SQL query using VBA and assign the RowSource property of a list box the recordset returned. Can I somehow use aliases for the field names in this case?
' Create a query
strSelect = "Select * FROM TEXNIKOS"
[Texnikoi_List].RowSource = strSelect
Where Texnikoi_List is a list box component.
I now get as as field titles the original names of the fields, which are rather ctyptic.
I'm afraid you have to name each field in turn and provide the alias e.g.
Select [field1] AS [field1NewName], [field2] AS [field2NewName] from [TableName]
If you open up the query you produced the aliases using the ":" operatator, and look in the SQL view you will see what Access does to create aliases (basically the SQL reads as above), and you can copy and paste if you don't fancy writing it out again from scratch (although you will learn more by writing it out)