northernbeaver
Programmer
I have a continuous form that is bound to the table. three fields in question at the moment:
cboCategoryID - a combo box bound to field catID
txtEmployeeID - a text box bound to field EmpID and is hidden
txtStartDate - a text box bound to field startdate the textbox is set to have the format of short date and is hidden as well
there are two objects in the header of the form that are not bound to any fields in the table where the user is to enter the start date and select from a combo box which employee.
now that you have history and a picture of what Im doing here is the problem Im having. under the On lost focus event of cboCategoryID I have the following simple code that doesnt seem to work
now when the code runs and you trigger the lost focus code it selects the first .txtemployeeid and gives a compile error: sub or function not defined. I have verified that there are no spelling mistakes. anyone know why I cant reference fields on a continuous form?
cboCategoryID - a combo box bound to field catID
txtEmployeeID - a text box bound to field EmpID and is hidden
txtStartDate - a text box bound to field startdate the textbox is set to have the format of short date and is hidden as well
there are two objects in the header of the form that are not bound to any fields in the table where the user is to enter the start date and select from a combo box which employee.
now that you have history and a picture of what Im doing here is the problem Im having. under the On lost focus event of cboCategoryID I have the following simple code that doesnt seem to work
Code:
If Me.txtEmployeeID = "" Or insull(Me.txtEmployeeID) Then
Me.txtEmployeeID = Me.cboDefEmp
End If
If Me.txtStartingDate = "" Or IsNull(Me.txtStartingDate) Then
Me.txtStartingDate = Me.txtDefault
End If
If Me.categoryid = "" Or IsNull(Me.categoryid) Then
MsgBox "Please select category before entering hours"
Me.categoryid.SetFocus
End If
now when the code runs and you trigger the lost focus code it selects the first .txtemployeeid and gives a compile error: sub or function not defined. I have verified that there are no spelling mistakes. anyone know why I cant reference fields on a continuous form?