New Record On Top

cardgunner

Registered User.
Local time
Today, 13:40
Joined
Aug 8, 2005
Messages
210
I want the New record line to be the first record of my form. Is there a way to set this?
 
Create query, use the query as your form's record source, sort your PK in descending order.
 
I think he means the "new record" line, the blank one for entering, which, as I understand it, isn't possible. One of the ways I work around it is to have two subforms, one that is not editable which shows the history, sorted however I want, and one above it that only allows new records to be entered and after the update requeries both, so that the first subform only ever shows a new record line, and the one underneath is always up-to-date.
 
Oh I see Kryst.

With Kryst's method you would also need to ensure that the Allow Additions property for the bottom subform is set to No as well.
 
Oh I see Kryst.

With Kryst's method you would also need to ensure that the Allow Additions property for the bottom subform is set to No as well.

Excellent point vbaInet. Hmmm. I wonder if a listbox would be better to hold the history then a subform, as far as readability that is.
 
If the OP wants read-only records then that could be a possibility, but with listboxes the column widths are "fixed" so maybe a subform would be best as you initially suggested.
 
This is quite an interesting idea....something I might think about putting in my database :)
 
Kryst's method is the one I've seen most. I also saw somebody use unbound textboxes above the lower subform. Clicking a button would fire code to add a record using them, requery the subform below and clear the textboxes.
 
Wow, I thought for sure there was a setting for this. I'm surprised.
 
And if you're as good a programmer as our MVP Paul, then you can synch the widths of the textboxes to the subform if it's resized. This is all cosmetic stuff though. Stick to getting it working first :D
 
However I will want my OP to be able to edit ccertain fields in the history form as well.
 
However I will want my OP to be able to edit ccertain fields in the history form as well.

Then you can leave the history form as editable.... You could still use the listbox too, you could use the double click event to open a form to the clicked on record, it could be a fail-safe against accidental changes.
 
You could still use the listbox too, you could use the double click event to open a form to the clicked on record, it could be a fail-safe against accidental changes.

I'm not sure if the users have that much mental capabilites. And I'm not that good, a novice really, at codes and programming. If it wasn't for this forum I'd be in trouble.:)
 
Set the ID field to Is Null and it will always open up with a new record. On Lost focus of the first subform Requery both subforms.
 
I'm not sure if the users have that much mental capabilites. And I'm not that good, a novice really, at codes and programming. If it wasn't for this forum I'd be in trouble.:)

I learned how to do this on this forum. I'd be in trouble too if it weren't for this forum. I have learned so much in the past year that I have been a member.
 
synch the widths of the textboxes to the subform if it's resized.

Resize?!? Who lets users resize anything? They'll take what I give them and like it! :p
 
Resize?!? Who lets users resize anything? They'll take what I give them and like it! :p
That's because you have good marketing skills:p hehe!

cardgunner: If I've got time later I will do up a sample db but I would advise you start playing with the idea and not bank on me:)
 
More due to "captive audience" than marketing skills. Most of what I write is for my coworkers to use.
 
That's because you have good marketing skills:p hehe!

cardgunner: If I've got time later I will do up a sample db but I would advise you start playing with the idea and not bank on me:)

pbaldy has a good exmple of the list-box idea on his site, just click on the link in his sig and look for multi-select append (I think). Also cargunner, just because you are not familiar with it doesn't mean you can't learn... And one way I have taught my users to "use" the db and its features is to have instructional labels that guide them, for a time, and then later go and remove the instructions if they are unsightly and people have gotten used to it, I have even done training sessions to introduce people to features that they wouldn't otherwise know about, so don't underestimate your users, they could surprise you. :D

Edit: Here's the link.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom