Entering notes in subform - entering new one at the top

vangogh228

Registered User.
Local time
Today, 16:21
Joined
Apr 19, 2002
Messages
302
I have searched the forums on several terms, like descending, notes, dates, sort, subform, continuous... but am not finding the answer I am looking for. Any help would be greatly appreciated.

I am trying to enter notes in a continuous subform where the notes are entered with a date field defaulted to today. I would like the previously entered notes to appear in descending order (newest first) but ALSO need to have the entry field for the next note to be at the top. I have a hidden autonumber field, hoping to use that to sort for notes that are entered on the same day.

I have the subform linked directly to my notes table. Should I use a query instead? What would be the advantage of doing that... is there some functionality that would become available that I can't use now?

THANKS for any help!!!

Tom
 
You can't. You can sort the historical entries but the new entry is always at the bottom.

But you can cheat! Create two subforms, one in data entry mode for a single record and a continuous form that's read only. Stack them on top of each other so that it looks like a single subform.
 
Neat trick... I wasn't sure if I could/should really do that. THANKS!
 
OK, I did it... but...

The sorting doesn't put the new ones at the top. I built a query to drive it, using my autonumber sorted DESC, which resulted in an entry in the Order By field, but the notes still show building at the bottom.

Also, if I have Form1, subform1 for my order entry and subform2 to display the notes history, how do I refresh to get my just-entered note (in subform1) to immediately display in subform2?? I don't know what to do here...

THANKS again!
 
The sorting doesn't put the new ones at the top. I built a query to drive it, using my autonumber sorted DESC, which resulted in an entry in the Order By field, but the notes still show building at the bottom.
Not obvious what is happening here. Can you do a screen grab of your form, or even better, post a stripped out and compacted version of your database.

Also, if I have Form1, subform1 for my order entry and subform2 to display the notes history, how do I refresh to get my just-entered note (in subform1) to immediately display in subform2?? I don't know what to do here...
Have a look at the Requery comand in VBA.
 
You have created a sorted query for the notes, but you've based the form on the table. If you base the form on the query it will sort as you want it.

You'll need some code to refresh your subform. I'll try and look at this later today.
 
Wow...

sometimes it is amazing what obvious stuff you miss. THANKS!!!

I think... hmmmm... would this be a me.requery on the after update event of the note? I'll try that, but not sure what's going to happen here. I've never requeried on a subform before.
 
Aha!

I entered an after-update event on subform1 that subform2 be requeried, and it works perfectly.

THANKS FOR YOU HELP, NEIL.
 

Users who are viewing this thread

Back
Top Bottom