misuser2k7
MIS
I am trying to work with 3 options or contents of 3 textboxes on a form that displays several records. The first option is default and is supposed to be the usual choice. Either of the other two can be selected by the user depending on the situation. When the user makes a choice (between 2 and 3), the content of the choice textbox becomes the content in the ‘Main’ textbox which a completely different textbox from the 3 choice textboxes. The ‘Main’ textbox is usually populated with content from the choice number 1 textbox. But if the user chooses option 2 or 3, then contents of 2 or 3 textbox becomes the content of the ‘Main’ textbox. I am using an Option frame for the other two choices/options (choices 2 and 3).
The option frame works (see code below) but when I move to the next record, the choice and change is not saved even though I have a Save button to be used to expressly save the change.
Also, the option frame does not reset when I move to the next record i.e. the selection made with the previous record remains intact though the content in the 'Main' textbox for that record is not affected.
Is there a way to ensure that the selection on the option frame is saved and the option frame resets when the form displays the next record?
Thanks for your help.
----------------------------------------------------
If OptFrame.Value = 2 Then
Me.txtMain.Value = Me.txtOptRelatedChoice2
Me.txtMainDate.Value = Me.OptRelatedChoice2Date
ElseIf OptFrame.Value = 3 Then
Me.txtMain.Value = Me.txtOptRelatedChoice3
Me.txtMainDate.Value = Me.OptRelatedChoice3Date
Else
Me.txtMain.Value = Me.txtOptRelatedChoice1
Me.txtMainDate.Value = Me.OptRelatedChoice1Date
End If
-----------------------------------------------------