G
Guest
I'm using a combo box to create a search field in a form. The data below
works on every other form but I keep getting an error on a new form. The only
difference between this text and the one that works is the word project is
replaced with company. The company one works perfect (so does the one for
employees) but I can't get this to work right. The debugger always highlights
the Me!ProjectName.SetFocus line. HELP!!!
Private Sub cboFindProject_AfterUpdate()
'Moves to the Project Name text box and
'finds the record of whatever Name is selected in the combo box
DoCmd.ShowAllRecords
Me!ProjectName.SetFocus
DoCmd.FindRecord Me!cboFindProject
'Set value of combo box equal to an empty string
Me!cboFindProject.Value = ""
End Sub
works on every other form but I keep getting an error on a new form. The only
difference between this text and the one that works is the word project is
replaced with company. The company one works perfect (so does the one for
employees) but I can't get this to work right. The debugger always highlights
the Me!ProjectName.SetFocus line. HELP!!!
Private Sub cboFindProject_AfterUpdate()
'Moves to the Project Name text box and
'finds the record of whatever Name is selected in the combo box
DoCmd.ShowAllRecords
Me!ProjectName.SetFocus
DoCmd.FindRecord Me!cboFindProject
'Set value of combo box equal to an empty string
Me!cboFindProject.Value = ""
End Sub