G
Guest
I would like to make a celle active for dataentry only if another cell is set to "other"
I put a small code into the "after update event" (see on bottom of letter).
It works as long as I run the subform alone.. .. my cell is only active for entry when "FK_Householdaccestype = 4".
BUT when it have to run in the main form as a subform .. first I got that it could not find the form.. then I added the name of teh "mainform" (Basefarminfo!). Now I get the error "Object dosntt support this property or method"
WHAT CAN I DO?
I would also like the cell to get "enabled=false" after entering/choosing entry but the program only alowws me to make it "enabled=false" when I enter a new field
ANY suggestion?
Best wishes
Reno Lindberg
Private Sub Householdacces_AfterUpdate()
On Error GoTo HouseholdAcces_AfterUpdate_Err
If (Forms!Basefarminfo!Basefarminfo_sub_householdaccestype!FK_Householdaccestype = 4) Then
Forms!Basefarminfo!Basefarminfo_sub_householdaccestype!AccessubType.Enabled = True
End If
Me.Refresh
HouseholdAcces_AfterUpdate_Exit:
Exit Sub
HouseholdAcces_AfterUpdate_Err:
MsgBox Error$
Resume HouseholdAcces_AfterUpdate_Exit
End Sub
I put a small code into the "after update event" (see on bottom of letter).
It works as long as I run the subform alone.. .. my cell is only active for entry when "FK_Householdaccestype = 4".
BUT when it have to run in the main form as a subform .. first I got that it could not find the form.. then I added the name of teh "mainform" (Basefarminfo!). Now I get the error "Object dosntt support this property or method"
WHAT CAN I DO?
I would also like the cell to get "enabled=false" after entering/choosing entry but the program only alowws me to make it "enabled=false" when I enter a new field
ANY suggestion?
Best wishes
Reno Lindberg
Private Sub Householdacces_AfterUpdate()
On Error GoTo HouseholdAcces_AfterUpdate_Err
If (Forms!Basefarminfo!Basefarminfo_sub_householdaccestype!FK_Householdaccestype = 4) Then
Forms!Basefarminfo!Basefarminfo_sub_householdaccestype!AccessubType.Enabled = True
End If
Me.Refresh
HouseholdAcces_AfterUpdate_Exit:
Exit Sub
HouseholdAcces_AfterUpdate_Err:
MsgBox Error$
Resume HouseholdAcces_AfterUpdate_Exit
End Sub