Working with Access 2000 front-end and SQL Server 2000 back-end...
I have a subform that is resistant to ordering its records by a certain value. Please read on.
I have a view (qryBrandLots) which combines data from two different tables (LOT and AUCTION). By default the results are ordered by a value called LotNum, which comes from the LOT table.
qryBrandLots is the record source for a datasheet form (DataForm). DataForm's OrderBy property is set to qryBrandLots.LotNum, and the Unique Table property is set to LOT. DataForm is itself used as a subform on another form (MainForm), and MainForm is opened from elsewhere by a command button with the following command in its OnClick event:
DoCmd.OpenForm stDocName, acNormal, , stFilter
When MainForm opens, the DataForm subform displays the properly filtered records, but they are NOT ordered by LotNum. Rather, they appear to be ordered by EbayNum -- which is the key value of the AUCTION table that's referenced in the underlying query.
I don't want to have to order the records in the subform AFTER it opens. How can I get it to pay attention to its own OrderBy property?