ccondran08
Registered User.
- Local time
- Tomorrow, 00:43
- Joined
- Feb 27, 2014
- Messages
- 58
Hi, looking for some help here please. I have a main form which has a subform and in the 'On Load' event it checks that the user's name (ENVIRON) is in a table as a security measure. If the user's name isn't in the table then one particular column is disabled so the user can not access the column.
Then I have two text boxes (txtUserNameLookup and txtUserNameLookupResult) on the main form which one of them is linked to a field in the subform (=[qry_Actions subform].[Form]![Owner]). Each time the user clicks on a different record then txtUserNameLookup will display the text of the what is in the field "Owner". I want to perform an action if and when the two textboxes are equal. I have the following code below which works fine in the 'On Load' event but if I change it to the 'After Update' event in the textbox linked to the field in the subform (txtUserNameLookup) then nothing happens. :banghead:
If Me.txtUserNameLookup.Value = Me.txtUserNameLookupResult.Value Then
Forms![frm_Actions]![qry_Actions subform]![Combo38].Enabled = True
Else
Forms![frm_Actions]![qry_Actions subform]![Combo38].Enabled = False
End If
Forms![frm_Actions]![qry_Actions subform].Requery
Then I have two text boxes (txtUserNameLookup and txtUserNameLookupResult) on the main form which one of them is linked to a field in the subform (=[qry_Actions subform].[Form]![Owner]). Each time the user clicks on a different record then txtUserNameLookup will display the text of the what is in the field "Owner". I want to perform an action if and when the two textboxes are equal. I have the following code below which works fine in the 'On Load' event but if I change it to the 'After Update' event in the textbox linked to the field in the subform (txtUserNameLookup) then nothing happens. :banghead:
If Me.txtUserNameLookup.Value = Me.txtUserNameLookupResult.Value Then
Forms![frm_Actions]![qry_Actions subform]![Combo38].Enabled = True
Else
Forms![frm_Actions]![qry_Actions subform]![Combo38].Enabled = False
End If
Forms![frm_Actions]![qry_Actions subform].Requery