Set Binding Navigator

  • Thread starter Thread starter Diarmuid
  • Start date Start date
D

Diarmuid

My app is a diary, based on a Weeks table. There is a WeekID, and a
WeekCurrent boolean value.

Setup like this
Form = fDiary
Navigator = WeekBindingNavigator
bound to WeeksBindingSource -> datasource of PlannerDataSet

I want to use the Navigator to scroll through the weeks. But I'd like the
form to open on the current week. That is, where
WeekCurrent = True

Whats the best way of doing this?
Thanks
Diarmuid
 
I'm laughing at this, because you seem to have no idea what I mean, and I
have no idea what you mean! :)

I must be explaining badly, so I'll try again. I've had my coffee now, so I
hope I make more sense.

Lets say there are 5 records in my table. The form will always open on
record 1. But I want the form to open on record 3. If the user clicks
'previous record', record 2 is displayed. "Next" moves onto record 4.
So, how would I get the Navigator to start on record 3?

Thanks
Diarmuid
 
Cor - you are a genius!
In my case, the code was
Dim Manager As CurrencyManager

Manager = CType(Me.BindingContext(Me.WeeksBindingSource), CurrencyManager)

Manager.Position = 3

Now I just to write code to find the Week Number of the current week, and
use that instead of the 3 above.
Thanks very much,
Diarmuid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top