Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting records after new entry

Status
Not open for further replies.

eussias

Programmer
Sep 25, 2001
97
AU
I have a VBA application consisting of 8 forms... what I'm hoping to achieve is, after a new record has been added, I want the records to then be sorted on the primary key... doesn't seem to be working for me at the moment... any ideas??
 
Hi, assuming that you have all 8 Forms open at same Time, try to do this for Each Form after append some new Data

1 - For the Main Form

Me.Refresh

2 - For the other Forms dont use refresh because is not aloud, use Requery like this.

[Forms]![Form1].Requery
[Forms]![Form2].Requery
[Forms]![Form3].Requery
[Forms]![Form4].Requery
[Forms]![Form5].Requery
[Forms]![Form6].Requery
[Forms]![Form7].Requery

3 - If you have Sub Forms use like this

[Forms]![MAINForm1]![SUBForm].Requery

Hope it helps
Best Regards

---
JoaoTL
NOSPAM_mail@jtl.co.pt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top