Avatar of Galisteo8
Galisteo8

asked on 

Subform's OrderBy is being ignored

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?

Thanks,
Galisteo8
Microsoft Access

Avatar of undefined
Last Comment
Galisteo8
Avatar of Bob Lamberson
Bob Lamberson
Flag of United States of America image

Galisteo8,
> 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.
Does this query have the Order By statement in it? maybe you could post the query?

Bob
ASKER CERTIFIED SOLUTION
Avatar of bluelizard
bluelizard
Flag of Switzerland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Galisteo8
Galisteo8

ASKER

BlueLizard,

I'll try your suggestion.  Will post the query for perusal if that doesn't do the trick.
Avatar of Galisteo8
Galisteo8

ASKER

Thanks, that got it.  Should have thought of that!

--Galisteo8
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

226K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo