I not entirely sure if this is what you are asking (Tell me if I am wrong) however if I need to isolate the contents of a field for checking purposes I usually use
Code:
if me.fieldname= "Yourinfohere" then ...
in the Form_Current() method. This will isolate the context of the textbox/combobox being used. For check boxes use true/false as necessary.
Below are a couple of examples
<h3>example 1</h3>
Code:
If Me.Loggedin_txt = "Usernamehere" Then
'If so then allow new users button
Me.NewUser_btn.Visible = True
Me.NewUser_lbl.Visible = True
End If
<h3> Example 2 checkboxes</h3>
Code:
If recClone.RecordCount = 0 Then
MsgBox "There is no one to be billed this month"
DoCmd.Close
Else
'If to see if the URL expiry is within next month, add to bill.
If Me.NextRenewel_URL <= Date + 31 Then
BillTotal = Me.CostPA
Else
BillTotal = 0
End If
'more code here
End If
Alright it's crude, probably not the most efficient way of doing things, but it works. If anyone else reading this knows more efficient ways of checking data, please let me know.
If however you want to edit control source based on the contents of a text box try this (Once again crude, and almost certainly not totally efficient)
Code:
If Me.ClientName = "fhjk" Then
Me.Text1.ControlSource = "= DomainName" 'Due to fact its a text field
Else
Me.Text1.ControlSource = "=" & ExtentionNumber 'not text field therefore no need
'for "..."
End If
HTH
---
David Thorne, Student
UK