shabbaranks
Registered User.
- Local time
- Today, 06:37
- Joined
- Oct 17, 2011
- Messages
- 300
I dont suppose you can help with this please .....
Im trying to get it so if the combo is blank or there is no data in the text box it errors, but at the moment its just going around in a loop :
Thansk again
Im trying to get it so if the combo is blank or there is no data in the text box it errors, but at the moment its just going around in a loop :
Code:
Private Sub TotalHoursOk_btn_Click()
Dim MySQL As String
Dim sGroupID As Integer
Dim sUserID As String
Dim sProjectRef As String
Dim sTotalhours As String
sUserID = "Forms![TimesheetForm]![LoggedInUser]"
sGroupID = DLookup("DepGroupID", "UserNames_tbl", "[sUser]=" & sUserID)
sProjref = Me.ProjectRef_txtbox
sTotalhours = Me.TotalHours_Combo
If Me.ProjectRef_txtbox = "" Then
MsgBox "You must enter a project number", vbInformation
Me.ProjectRef_txtbox.SetFocus
Exit Sub
End If
If Me.TotalHours_Combo = "" Then
MsgBox "You must make a selection from the combo box", vbInformation
Me.TotalHours_Combo.SetFocus
Exit Sub
End If
Thansk again