Hi All,
In a single main form, I've inserted a Yes/No option group (No is default) asking a users if they want to "Enter additional info?"
If a user selects Yes in a particular record, I'd like for the additional info fields (Book, BkPage, BkIndex) to become visible for data entry. And, these fields should then always stay visible for that record. Note that the 3 fields don't all have to contain data. The option group frame (optFrame) also needs to become transparent or invisible (because I plan to place the option group directly over the 3 fields), but maintain its value.
If the user selects Yes, but then happens to LEAVE ALL of the Book, BkPage, BkIndex fields null, the 3 fields should disappear and the option group should reappear with 'No' again selected.
If a user selects Yes in a record, enters data in the 3 fields, then goes to the previous record that, say, was 'No', the option group with No selected should remain visible. If the user returns to the record with data entered for at least 1 of the 3 fields, the 3 fields should be visible. If the user goes to a new record, the option group with No as default should again be visible.
Here is code so far I've come up with for the option group's AfterUpdate event:
Private Sub optFrame_AfterUpdate()
Select Case Me.optFrame
Case 1
Me.Book.Visible = True
Me.BkPage.Visible = True
Me.BkIndex.Visible = True
Me.Book.SetFocus
' not sure about this part; Me.optFrame.Visible = False
Case 2
Me.Book.Visible = False
Me.BkPage.Visible = False
Me.BkIndex.Visible = False
' not sure about this part; Me.optFrame.Visible = True
End Select
End Sub
Here is code so far I've come up with for the form's (record's?) OnCurrent event:
Private Sub Form_Current()
If optFrame.Value = 1 Then
Me.Book.Visible = True
Me.BkPage.Visible = True
Me.BkIndex.Visible = True
' not sure about this part; Me.optFrame.Visible = False
Else
Me.Book.Visible = False
Me.BkPage.Visible = False
Me.BkIndex.Visible = False
' not sure about this part; Me.optFrame.Visible = True
End If
End Sub
Any advice/assistance would be greatly appreciated!!!!
In a single main form, I've inserted a Yes/No option group (No is default) asking a users if they want to "Enter additional info?"
If a user selects Yes in a particular record, I'd like for the additional info fields (Book, BkPage, BkIndex) to become visible for data entry. And, these fields should then always stay visible for that record. Note that the 3 fields don't all have to contain data. The option group frame (optFrame) also needs to become transparent or invisible (because I plan to place the option group directly over the 3 fields), but maintain its value.
If the user selects Yes, but then happens to LEAVE ALL of the Book, BkPage, BkIndex fields null, the 3 fields should disappear and the option group should reappear with 'No' again selected.
If a user selects Yes in a record, enters data in the 3 fields, then goes to the previous record that, say, was 'No', the option group with No selected should remain visible. If the user returns to the record with data entered for at least 1 of the 3 fields, the 3 fields should be visible. If the user goes to a new record, the option group with No as default should again be visible.
Here is code so far I've come up with for the option group's AfterUpdate event:
Private Sub optFrame_AfterUpdate()
Select Case Me.optFrame
Case 1
Me.Book.Visible = True
Me.BkPage.Visible = True
Me.BkIndex.Visible = True
Me.Book.SetFocus
' not sure about this part; Me.optFrame.Visible = False
Case 2
Me.Book.Visible = False
Me.BkPage.Visible = False
Me.BkIndex.Visible = False
' not sure about this part; Me.optFrame.Visible = True
End Select
End Sub
Here is code so far I've come up with for the form's (record's?) OnCurrent event:
Private Sub Form_Current()
If optFrame.Value = 1 Then
Me.Book.Visible = True
Me.BkPage.Visible = True
Me.BkIndex.Visible = True
' not sure about this part; Me.optFrame.Visible = False
Else
Me.Book.Visible = False
Me.BkPage.Visible = False
Me.BkIndex.Visible = False
' not sure about this part; Me.optFrame.Visible = True
End If
End Sub
Any advice/assistance would be greatly appreciated!!!!