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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add "spin button" on access form

Status
Not open for further replies.

jamaarneen

Programmer
Dec 27, 2007
213
BE
Hi,
Is there any way to add "spin button" to an access form?
I mean those tow little arrows (up & down), so a user can increase or decrease a value?
thanks in advance
ja
 
jamaarneen,
There is a Spin Button control in the MSForms 2.0 collection.

With your Access form open in design view:
[tab]Insert > ActiveX Control...
[tab]Microsoft Forms 2.0 SpinButton

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Hi CautionMP,
Thanks a lot.
It's just GREEEAAAT to get this so simple and ready.

and by the way I learned that I have got a lot of controls there in the 'ActiveX Control' list (but I'll still have to figure out how to use some of them. can you maybe please give me a link somewhere i can get help about this ActiveX Controls?)

and again: thank you
ja
 
MSForms is a standard controls library for VBA. In VBE display object browser, select MSForms library, select SpinButton class and press F1.

combo
 
combo,
thank you for referring me to the library help. I will sure make use of it...

but still have got something strange with my spin button, I am using it on a continuous form, if I'm clicking on the spin button on one record, ALL spin buttons are getting (and staying) selected. is there any way to avoid this?

and also, when clicking on the 'up' button, the 'down' button is also selected.

thanks again for all your help
Ja
 
Hi again all of you,

after a little experimenting, I have more analyzed my problem.

1) normal, a [p]bound[/p] button on a continuous form, will act for each record separately, while an [p]bound[/p] button will act simultaneous on ALL record.
2) an 'ActiveX control' (like a spin button) cannot be [p]bound[/p] on a [p]continuous[/p] form (that's what the message told me).

now, the question is, is there any way to work this out, so the spin button should work separately for every record on a p]continuous[/p] form?

thanks for helping me
 

There is no [tt][p]stuff[/p][/tt] tgml tag.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
your right, SkipVougth. sorry.

i ment [b] stuff [/b]

OK now?
Thanks
 
The spin button does misbehave in VBA, to get around the problem I used 2 command buttons.
 
Thanks ettienne,
I was thinking of using command buttons, but how can I create a little button with a little arrow on it (up or down) - because the caption text will always be a few mm away from the top of the button
(actually somebody here advised me to use a label or textbox, and set the vertical property too true. a nice workaround, but still bot a button)
Ja
 
ettienne,
I was also thinking of using command buttons, but I cannot format the buttons, so I should get a little button with an arrow (up or down) on it - the text on a control, will always be moved from the upper edge. (actually I got advise from someone here, to set the vertical property of the control to true - and that's a good idea).
but I got my work around, because in the 'SpinUp' & 'SpinDown' events, I put some code that should always 'SetFocus' to another control.
Thank you
Ja
 
Thanks again & Sorry ettienne

thanks for the advise of putting a picture, but how do I get or create a tiny arrow picture

sorry for the duplicate. I didn't saw my first reply (had to refresh my page), so I post it again
 
To display an arrow on a command button I change the text style to "wingdings 3" and use the letters 't' and 'u'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top