How to build sliding bar displays?

novoiceleft

Registered User.
Local time
Today, 23:55
Joined
Jul 4, 2004
Messages
65
Hello All

Does anyone know how you might build sliding bar displays as an input device for scores into an Access database? I am building an application that could really use something like this.

Here is an example. First go to the 'Chelsea tab', slide the bars, submit the results, and see the results on the "Results" tab

http://news.bbc.co.uk/sport1/hi/football/teams/c/chelsea/6173703.stm

Very impressive

NoVoice
 
That's called the Microsoft Slider Tool. It's not on the standard toolbar (with Textbox, Label, ComboBox, etc.). Click the "More Tools" icon (looks like a wrench and a hammer) and add the Microsoft Slider Tool. From there, just drag the control on to the form. The properties/methods, etc. should be pretty self-explanatory from there.
 
Wow - that's amazing.

I have worked out how to put it on my form, but I couldn't work out how to build the events in order to bind the control to the table data.

Could someone explain the code I need to bind it to a field in my table?

The control is called "Slider1". The field is called t_employees.score. The Primary Index in the table is EmployeeID.

I would like it to do the following
- As you scroll through the form (for each employee), to display the current score in the table.
- If you move the slider to a new score, for that score to be updated in the table.

By the way, the only events available on this control are:

On updated, on enter, on exit, on got focus, on lost focus.

Many thanks for your help. This is very exciting (if it works)!!

NoVoice
 
Hello Again

Can anyone help me here on the couple of lines of code I need??

Many thanks

NoVoice
 
if your slider is called Slider0 and the data item is called DataItem, go to the code window (alt-f11) and insert the following code:

Code:
Private Sub Slider0_Change()
Me.DataItem = Slider0.Value
End Sub

good luck,
e
 
I think this is really cool but im not very good with code.

By 'DataItem' do you mean the field on the form that you want to number to appear in?

I have a field called 'Score' and a box showing that data on a form.

How can i make the slider value (all on the same form) input the 'Score' data??

Thanks alot.
 
NoVoice,

You can't bind the ActiveX control to your table directly. Access binds data
through the ControlSource property and the control doesn't support that.

The slider is gonna act like an unbound control on a Continuous form.
Access will let you do quite a bit with Continuous Forms ... things
like Conditional Formatting, displaying "proper" values, etc.

But I don't think that it will manage multiple Slide controls. I think
the best you can do is have only one Slide control that's NOT in the Detail
Section. This gives you only one Slider and it's a view of only the Current
record.

Even then you'd have to keep them in "synch" with event code:


Code:
Private Sub ActiveXCtl4_GotFocus()
  Me.ActiveXCtl4.Value = Me.YourField
End Sub

Private Sub ActiveXCtl4_LostFocus()
  Me.YourField= Me.ActiveXCtl4.Value
End Sub

Private Sub ActiveXCtl4_Updated(Code As Integer)
  Me.YourField= Me.ActiveXCtl4.Value
End Sub

Private Sub YourField_AfterUpdate()
  Me.ActiveXCtl4.Value = Me.YourField
End Sub

If you do find a way to use the Slider on a Continuous Form, post back,
I'd like to see it.

Wayne
 

Users who are viewing this thread

Back
Top Bottom