machine_run
asked on
Access 2000 : Toggle button gets focus in continuous form?
I have a continuous form with toggle buttons in each record connected to a field to mark records. There is a query that sums data from records that are marked.
It works OK but, when I click in the form (outside the toggle button) the toggle button gets the focus and the query totals change depending on which record's toggle button has the focus. The values in the table associated with the form do not change, unless I actually click the toggle buttons. I tried making On Enter / On Exit events lock the button and Allow / DisAllow editing of the form but that had no effect.
Anyone know of a way to prevent the focus from going to toggle buttons when another field is clicked? (The other fields are all locked)
TIA
It works OK but, when I click in the form (outside the toggle button) the toggle button gets the focus and the query totals change depending on which record's toggle button has the focus. The values in the table associated with the form do not change, unless I actually click the toggle buttons. I tried making On Enter / On Exit events lock the button and Allow / DisAllow editing of the form but that had no effect.
Anyone know of a way to prevent the focus from going to toggle buttons when another field is clicked? (The other fields are all locked)
TIA
set the tab stop property of the toggle button to NO.
ASKER
setting the tab stop property of the toggle button to NO had no effect on the behavior!
The form is a subform by the way. I don't know why that would matter though.
The form is a subform by the way. I don't know why that would matter though.
They will get the focus when you click into the control if no other control can receive the focus tab stop set to no or not.
The tab stop property is often mis-understood; all it means is that when using the tab key, the control will be skipped. It doesn't mean a control stopped from receiving the focus. That's controlled by the enabled property.
Not sure if that will solve anything for you or not. Sounds kind of weird.
Theses controls are bound correct? and not part of a group?
Jim.
The tab stop property is often mis-understood; all it means is that when using the tab key, the control will be skipped. It doesn't mean a control stopped from receiving the focus. That's controlled by the enabled property.
Not sure if that will solve anything for you or not. Sounds kind of weird.
Theses controls are bound correct? and not part of a group?
Jim.
ASKER
The controls are bound. The query total textbox is in the form footer and gets its contents from a dlookup of a query that does the sum of items selected in the form detail.
If there was a way to make the rest of the form outside the toggle button to not move the focus in the continuous form to the record, it would be OK.
Everything but the toggle button is locked and disabled.
If there was a way to make the rest of the form outside the toggle button to not move the focus in the continuous form to the record, it would be OK.
Everything but the toggle button is locked and disabled.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
That works for controlling the focus.
I also took the sum textbox out of the subform altogether and put it on the main form. That stopped its erratic behavior.
Maybe it could have had something to do with a Me.Dirty = False command in the OnClick event of the toggle buttons on the subform.
Thanks!
I also took the sum textbox out of the subform altogether and put it on the main form. That stopped its erratic behavior.
Maybe it could have had something to do with a Me.Dirty = False command in the OnClick event of the toggle buttons on the subform.
Thanks!