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!

Current record on a form displaying problem without Navigation Buttons 5

Status
Not open for further replies.

0200050

Programmer
Jun 3, 2003
58
FI
The very best evening everybody!

Instead of what topic is all about I have actually a problem with sorting SUBFORM's data. I would like to sort that data from MAINFORM.

This is what i've tried to do to solve out this one:

For the main form:

Me.Subform.Form.OrderBy = "FixingDate ASC"
Me.Subform.Form.OrderByOn = True


I'm not sure in what Event would sort the dates out correctly, but I put the code above in Mouse Wheel Event, and it works when user scrolls with the mouse. Is there any other Event where it would work nicely? I've tried them almost all with not so good success. This sorting thing should be kinda automatic, user shouldn't have to do anything special to sort records by dates correctly.

Now, because I also have NAVIGATION BUTTONS on my main form, this problem isn't easy for me to fix out.

(HERE THE actually topic begins:)

Navigation buttons are pretty easy to everybody to use. That's why I wouldn't like to throw them away. I was wondering, is there any way to display the Current Record's number in Access on a form? (I thought if the NaviButtons aren't working good enough, I have to use another, but same kind of a implementation :)

At least this kinda property(which shows the current record, and also all records) is included in Navigation Buttons(It's in the middle of the buttons). If it's possible, I'd take the NaviButtons off, and replace them with normal Command ones.

With command buttons I could solve my SORTING problem out also, because this sorting method I described above works nicely when a Command button clicked.


Primary Question - Priority 1. Is there any way to Display Current Record(And refresh it automatically when scrolling/moving to another record happens) on a Microsoft Access 2000 form?

Secondary Question - Priority 2. If the previous isn't possible, or you just have a great idea how to sort out the records by DATE into the correct order on a SUBFORM I'd still be very pleased to hear it.

Every suggestion is welcome and well appreciated.

-0200050-
 
0200050
You can put a text box with this structure...

=IIf([CurrentRecord]>(Count(*)),'New Record',('Record ' & [CurrentRecord] & ' of ' & Count(*)))

Tom
 
Wow, thank you THWatson!

I modified it a bit, and it works pretty well. Actually I only need the CurrentRecord-property, so I use only that.

The sorting thing is still on to me, but I try to solve it out myself.

-0200050-
 
Nice clean code to do what I need. I was using the RecordsetClone but this is much better. TY [sunshine]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top