Setting groupboxvalue

mewfin

Registered User.
Local time
Today, 22:09
Joined
Aug 19, 2005
Messages
33
well.. i have a groupbox and i want to take away its value or change its value throu code.
when i try to make a simple. groubox.value = 0 i get that i cant give a value to a groupbox.
anyway to to this?
 
What is a GroupBox? Is there any other way to describe it? ComboBox maybe?
 
:o damn and ive been writing it in a few post, and now i get that no one got what i ment:D
well in swedish access its called a "gruppruta" wich kinda meen groupbox.
its not the combobox that must be the "kombinationsruta" =)
but the icon is a square and it has yzx at the topline of it.
it it used so that u can have multiple alternatives with radiobuttons or checkboxes but only 1 can be checked at once.
 
Ahha! In english that is called an Option Group. I figured you were not using an English version. Needless to say, your English is one heck-of-a-lot better than my Swedish! I use: Me.GrouBox = 1 all of the time. I do not specify the .value.
 
still not able to give it av value.
easiest way to change the value directly to the table then?

rohs - number
 
What sort of field is the OptionGroup bound to? If the Fieldname and the name of the OptionGroup are the same, Access has been known to get confused. Name the control optGrouBox maybe. You can not set the ButtonControl values inside the OptionGroup, it must be the OptionGroup control.
 
the field is number, option 1 has the value -1 and option 2 has the value 0 know i looks strange but thats the way it is, the box reads the value in the field and checks the radiobutton with that value, so i coud just change the value of the field in the table. but dont know the code for it.
 
-1 and 0 are also values for True and False respectively. What kind of "number"? Integer, LongInteger, Single, Double, etc. Changing the field in the underlying query/table is just a kludge. You need to determine why this is not working as expected or it will bite you eventually. Where are you trying to run this code? In what event?
 
eight now only on when im opening, im also gonna put it in oncurrentevent i think.
 
Remove it from the Open event and put it in the Current event. Open might be too early. You could also try the Load event.
 
seems like u where right!
putting on the Load event worked, but if oncurrent event is what i think it is in swedish it aint working so right now i gotta restart the form everytime to see the changes:P
 
In my system the OnCurrent Event is the 1st event on the events tab of the property sheet for the form. Stick a MsgBox in there as a diagnostic and see what is happening.
 
Your form *is* bound to a query/table isn't it? If not you will not get a Current Event.
 
ah! yes its bound, anything else i coud put it in to make it work instantly?
 
As in one of my prior posts...
In my system the OnCurrent Event is the 1st event on the events tab of the property sheet for the form. Stick a MsgBox in there as a diagnostic and see what is happening.
 
Use the builder "..." to add a MsgBox to the Current Event.

MsgBox "Just had a Current Event"
 
but i cant get the current event chause my form is bound?
and it has to be bound else i cant file the reports?
 
btw i tryed creating a new form and c if i coud find the on current event but still cant find it.
 

Users who are viewing this thread

Back
Top Bottom