Full Version: Command button wont refresh all fields
UtterAccess Forums > Microsoft® Access > Access Forms
tflett
This is the code I used to refresh two of my three subforms, but it wont refresh the first one.
any suggestions?
Private Sub Add_Client_Click()
On Error GoTo Err_Add_Client_Click
DoCmd.GoToRecord , , acNewRec
[Forms]![Client Data Entry]![ClientTraining subform]![Text27] = Null 'All unbound textboxes(Text40)
[Forms]![Client Data Entry]![EmployeeJobs subform]![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
balaji
You are missing .form after the names of the subforms.
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)
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.