I create a DAO.Recordset thus:
Set recJoined=MyDB.OpenRecordSet(" Select * From TableA Inner Join TableB On TableA.FieldA=TableB.FieldA")
The problem is that the Tables A and B have many fields, and some of them with the same name.
I now want to select a record with
recJoined.FindFirst FieldA="100"
This fails of course because 'FieldA' does not refer to a unique field. However when I change the criteria to:
recJoined.FindFirst TableA.FieldA="100"
I run into a 'unknown or invalid field reference' error.
I could specify an alias for the TableA.FieldA field of course in the Select statement, but as I need all fields from TableA and TableB and they have a lot, that would be very cumbersome indeed.
How to solve this?