Remember field in navigation form... (1 Viewer)

DenisCooper

Registered User.
Local time
Yesterday, 16:02
Joined
Feb 23, 2013
Messages
31
Hi,

On tab 1 of my navigation field i have a combo box which i use to select the record i want to look at.

but then if i click on another tab in my navigation form to have a look at another set of forms (not related) and i click back on the first tab with my combo box the combo box has reset it'self to be blank - not selected.

Is there a way that i can get the combo box to remember the last record that was selected and automatically go to it when i go back to the first tab?

thanks
Denis
 

highandwild

Registered User.
Local time
Today, 00:02
Joined
Oct 30, 2009
Messages
435
I am not sure whay it loses its value but there are number of ways in which you can sort this out.

The bound column of the combobox needs to be saved when an item is selected.

Either have a Public variable to store this value and do this in the Change event of the combobox or have another invisible text box on the form to which the value of the item selected is assigned.

When focus goes back to the first tab as you put it then set the value of the combobox to either the value stored in the variable or that stored in the textbox as appropriate. Do this in the On Got Focus event of the tab.

Does this make sense?
 

DenisCooper

Registered User.
Local time
Yesterday, 16:02
Joined
Feb 23, 2013
Messages
31
Thanks for the advice.

I created an unbound text box on the form and on the combo box change event did this

Me.TextboxName = Me.ComboName.Column(1).

When i change the combobox it shows the selected value in the combo box, i swap to another tab in the navigation form, and then go back to this one, and the text box has lost it's value too...

am i do something wrong?

thanks
 

Users who are viewing this thread

Top Bottom