Full Version: "Can't find the field "|" in your expression"
UtterAccess Forums > Microsoft® Access > Access Forms
tflett
does any one know what this error message means?
tflett
this message appears when I hit the command button "Add New Client"
t0nka
What is the code behind the Add New Client Button?
0nka
tflett
Private Sub Add_Client_Click()
On Error GoTo Err_Add_Client_Click
DoCmd.GoToRecord , , acNewRec
[Forms]![Client Data Entry]![Clients Information subform].Form = Null
[Forms]![Client Data Entry]![ClientTraining subform].Form [Text27] = Null 'All unbound textboxes(Text40)
[Forms]![Client Data Entry]![EmployeeJobs subform].Form [Text16] = Null 'All unbound textboxes(Text40)
Exit_Add_Client_Click:
Exit Sub
Err_Add_Client_Click:
MsgBox Err.Description
Resume Exit_Add_Client_Click

End Sub
dannyseager
Is the form bound?
jwhite
A cursory look at your Sub shows you are missing brackets around .Form and ! before the Control Name on two lines:

[Forms]![Client Data Entry]![ClientTraining subform].[Form]! [Text27] = Null 'All unbound textboxes(Text40)
[Forms]![Client Data Entry]![EmployeeJobs subform].[Form]! [Text16] = Null 'All unbound textboxes(Text40)

And why, above these two lines, are you attempting to Null the Form ???
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.