Hi
I have the following code as an After Update Event Procedure to make one of four optional text boxes visible on my form. This works ok and I can enter data into the text box.
My problem is that when I navigate away from the record and return later the text box is no longer visible (but if I re-select the option from the combo box it re-appears with the corect data).
Any ideas on where i am going wrong ?
Private Sub Acquisition_Method_ID_AfterUpdate()
With Me.Loan_No
Select Case Me.Acquisition_Method_ID.Value
Case 1 'Loan
.Visible = True
Case 2 'Donation
.Visible = False
Case 3 'Bequest
.Visible = False
Case 4 'Purchase
.Visible = False
End Select
End With
With Me.Donation_No
Select Case Me.Acquisition_Method_ID.Value
Case 1 'Loan
.Visible = False
Case 2 'Donation
.Visible = True
Case 3 'Bequest
.Visible = False
Case 4 'Purchase
.Visible = False
End Select
End With
With Me.Bequest_No
Select Case Me.Acquisition_Method_ID.Value
Case 1 'Loan
.Visible = False
Case 2 'Donation
.Visible = False
Case 3 'Bequest
.Visible = True
Case 4 'Purchase
.Visible = False
End Select
End With
With Me.Purchase_No
Select Case Me.Acquisition_Method_ID.Value
Case 1 'Loan
.Visible = False
Case 2 'Donation
.Visible = False
Case 3 'Bequest
.Visible = False
Case 4 'Purchase
.Visible = True
End Select
End With
End Sub
I have the following code as an After Update Event Procedure to make one of four optional text boxes visible on my form. This works ok and I can enter data into the text box.
My problem is that when I navigate away from the record and return later the text box is no longer visible (but if I re-select the option from the combo box it re-appears with the corect data).
Any ideas on where i am going wrong ?
Private Sub Acquisition_Method_ID_AfterUpdate()
With Me.Loan_No
Select Case Me.Acquisition_Method_ID.Value
Case 1 'Loan
.Visible = True
Case 2 'Donation
.Visible = False
Case 3 'Bequest
.Visible = False
Case 4 'Purchase
.Visible = False
End Select
End With
With Me.Donation_No
Select Case Me.Acquisition_Method_ID.Value
Case 1 'Loan
.Visible = False
Case 2 'Donation
.Visible = True
Case 3 'Bequest
.Visible = False
Case 4 'Purchase
.Visible = False
End Select
End With
With Me.Bequest_No
Select Case Me.Acquisition_Method_ID.Value
Case 1 'Loan
.Visible = False
Case 2 'Donation
.Visible = False
Case 3 'Bequest
.Visible = True
Case 4 'Purchase
.Visible = False
End Select
End With
With Me.Purchase_No
Select Case Me.Acquisition_Method_ID.Value
Case 1 'Loan
.Visible = False
Case 2 'Donation
.Visible = False
Case 3 'Bequest
.Visible = False
Case 4 'Purchase
.Visible = True
End Select
End With
End Sub