Slider Bar (1 Viewer)

dadrew

Registered User.
Local time
Today, 14:28
Joined
Sep 15, 2003
Messages
186
Can someone tell me how to produce/incorporate a slider bar, representing a distance from 500 to 3000 meters, going up in 500 metre increments. In Visual Basic there is a tool but not in access. Clearly the resulting setting needs to be saved in to a table.
 

KenHigg

Registered User
Local time
Today, 09:28
Joined
Jun 9, 2004
Messages
13,327
In my version of Access, I have a control named:

'Microsoft Forms 2.0 Scroll Bar'

I haven't used it, but it looks like it would be what you are needing. I am using Access 2002 and the control is found using the 'More Controls' button on the toolbox toolbar...

kh
 

dadrew

Registered User.
Local time
Today, 14:28
Joined
Sep 15, 2003
Messages
186
Yeah, just found that Ken, cheers. Only problem is i'm unsure as to how you capture the result into a table.
 

KenHigg

Registered User
Local time
Today, 09:28
Joined
Jun 9, 2004
Messages
13,327
Like I said, I've never used it. I did just play with it for a minute and it looks pretty straight forward...

kh
 

dadrew

Registered User.
Local time
Today, 14:28
Joined
Sep 15, 2003
Messages
186
OK, I dropped it on to the form and played with the proporties but I cant see any kind of control source for it, which makes me ask how to capture the data to a table.
 

KenHigg

Registered User
Local time
Today, 09:28
Joined
Jun 9, 2004
Messages
13,327
Looks like when you move the bar the controls 'value' proprty changes. I accessed it with:

forms!mySliderName.value

And there was some min/max propertites. Then I suppose all you would need to do is a little division to break it up into the chunks you need. (And there may be attributes to control that as well.(?))

kh
 

dadrew

Registered User.
Local time
Today, 14:28
Joined
Sep 15, 2003
Messages
186
Ok I uderstand the proporties but can you explain in more detail how to cature the data, thanks
 

KenHigg

Registered User
Local time
Today, 09:28
Joined
Jun 9, 2004
Messages
13,327
Hum....

1. Say you have a text box that is bound to a fld in a table. Let's say the fld name and the textbox's name is MyNumber. So if I wanted to change it's value to say 500, I could do a button, and in the button's onClick event, I'd do something like:

me!MyNumber = 500

2. So in the slider bar On Update event, do something like:

me!MyNumber = me!MySliderBarName

3. Then all you need to do is figure out the 500 thing...

Hope this helps
Ken
 

KenHigg

Registered User
Local time
Today, 09:28
Joined
Jun 9, 2004
Messages
13,327
See if this helps:

kh
 

Attachments

  • slidersample.zip
    10.3 KB · Views: 828

dadrew

Registered User.
Local time
Today, 14:28
Joined
Sep 15, 2003
Messages
186
Excellent, thanks Ken, this was exactly as I needed. Incidently in Access 2002 the slider is a little differentboth in looks and how it works. tried applying the same code to it but it didnt work, in the end I just copied the one that you poted and imported it. Again thank :) s!
 

KenHigg

Registered User
Local time
Today, 09:28
Joined
Jun 9, 2004
Messages
13,327
Cool. Be aware of the fact that the slider bar control is not considered a native Access control and that means you may need to test it on the workstations you intend to run the db on...

kh
 

Users who are viewing this thread

Top Bottom