Changin the place of new record? (1 Viewer)

massoudmail

The last one
Local time
Yesterday, 22:37
Joined
Dec 1, 2009
Messages
3
Hi
In a subform when I add data into the last record (normally the lower one) a new record is automatically created under that.
Now! How can I change it in this way: [when I add data in the last entered record (should be top one) a new record is automatically created on top of it]
Thanks a lot to help me.This is a really big problem of mine:confused:
 
Last edited:

Mr. B

"Doctor Access"
Local time
Today, 00:37
Joined
May 20, 2009
Messages
1,932
If you are recording the date when the record is created you can simpley sort your record in the sub form by that date in descending order and your records will be listed from the newest to the oldest. You don't even have to display the date field, just use it for sorting. You can define this field as a date type field and use Now() as the default value and it will auto populate each time a new records is created.
 

boblarson

Smeghead
Local time
Yesterday, 22:37
Joined
Jan 12, 2001
Messages
32,059
However, to answer the question about how you can have the NEW RECORD (blank spot) show up on top - you can't. It doesn't work that way. Many people have done this as a work around:

Create two subforms - one with data entry set to yes and sized to only the new record size and place that on top. The second (your current subform) has the Allow Additions property set to NO. Then in the top subform's After Update event you can do a Requery to make it change back to only a new record spot.
 

massoudmail

The last one
Local time
Yesterday, 22:37
Joined
Dec 1, 2009
Messages
3
However, to answer the question about how you can have the NEW RECORD (blank spot) show up on top - you can't. It doesn't work that way. Many people have done this as a work around:

Create two subforms - one with data entry set to yes and sized to only the new record size and place that on top. The second (your current subform) has the Allow Additions property set to NO. Then in the top subform's After Update event you can do a Requery to make it change back to only a new record spot.
And you don't think that can be solved be VB Codes?
 

missinglinq

AWF VIP
Local time
Today, 01:37
Joined
Jun 20, 2003
Messages
6,423
No it can't! The kludge Bob gave you is the only workaround for this problem! As he said, it Access simply doesn't work that way!
 

boblarson

Smeghead
Local time
Yesterday, 22:37
Joined
Jan 12, 2001
Messages
32,059
No it can't! The kludge Bob gave you is the only workaround for this problem! As he said, it Access simply doesn't work that way!

That is exactly what I was going to say. Access will NEVER put the new record on top. Code can't do it, nothing can. So you have to use two forms like I said.
 

Toolpusher

Registered User.
Local time
Today, 06:37
Joined
May 29, 2007
Messages
53
Hi I can get this to work perfect except the top form shows a vertical scroll bar on when viewed on the main form how do I get rid of this
 

Users who are viewing this thread

Top Bottom