setvalue on togglebutton onload

mikematthys

New member
Local time
Yesterday, 16:32
Joined
Jan 24, 2019
Messages
7
Hi,

so the problem was i have 3 togglebuttons and it has to remember witch one was last clicked, so even if you close down the db, on opening it has to toggle down the right button, how do i do this

i stored the output of the clicked box in a table field witch i linked to the form it is on in field 'toggle'

so in the onload i check what was the last value that has been entered by clicking on the togglebox

If Me.toggle = "1" Then

ElseIf Me.toggle = "2" Then

ElseIf Me.toggle = "3" Then

End If

now i would like to get that sertain button to be in a downstate
but how do i do this, i tried so many things and nothing seems to work

anyone got an solution ?

Mike
 
I assume your Toggle Buttons are contained within an Option Group (frame). If that is the case then:
Code:
Me.YourFrameName.Value = 2 or 3 or whatever
 
Presumably your toggle control is not bound, otherwise it would display the value for the current record on load.


If you want to keep the value in the same session of the Access database, then use a global variable to store the value during the OnClose event of your form.


If you want to keep the value from one session to another, you can save the value in a table.
 

Users who are viewing this thread

Back
Top Bottom