Tina Norris Fields
tinanfields at torchlake.com
Mon Dec 24 15:24:02 CST 2007
Hi Arthur, I have a subform that accepts payment information for a membership database. The subform gets opened by a button click on a membership information form. Underlying the subform is a query that filters on the ID of the member, and lists all the payments in descending order. Until you raised the question, I just accepted the fact that new records were added at the bottom and didn't show up on top until the next time the subform was accessed. I went into the subform's After Update event and added a DoCmd.Requery. Then I tried it out. Eureka! It works. As soon as I added a new payment record, it jumped to the top of the list. Hope this helps, Tina Arthur Fuller wrote: > My client is giving me so much aggravation on this! She wants the detail > records to show up most recent first, meaning that after a detail row is > added, it automatically drifts to the top of the subform, rather than > remaining on the bottom. This is easy enough to do, just by clicking the ZA > button on the toolbar after adding the new record, but what is the VBA > command constant that represents this command? > > I guess I'll try building a macro and see what code gets generated. If > anyone already knows how to code this, and has nothing better to do on > Christmas Eve, let me know. I can't recall ever building a macro in Access, > but what the hell, I'll give it a shot. > > Well, I gave it a shot, and I have no idea what this weird interface is > about. Excel macros are soooo much easier! I need to relocate that list of > Access command things and give that a try instead. The client is adamant > that she wants the most recent transactions on top, and I can see her point, > since there could be hundreds per master record and they show the balance, > which is the item of most immediate interest, and the transactions of > immediate interest are those within the last few days to month, so that's > why they should be on top not at the bottom. > > But I am having a most difficult time arranging this. Any advice greatfully > appreciated. > > TIA. > Arthur >