Well I solved the last one but now Im stumped again. The following code is in my functions module I am creating to check the data in the form is correct before inserting the new record.
Public Function CheckPhone(strCheckPhone As String)
If Len(strCheckPhone) <> 7 Then
MsgBox ("The Phone Number is Incorrect")
txtPhone.SetFocus
txtPhone.SelStart = 0
txtPhone.SelLength = Len(txtPhone)
End If
End Function
It gives an runtime error '424' object required on the "txtPhone.SetFocus" line. The message box pops up fine and everything. Any help would be great thank you.
Public Function CheckPhone(strCheckPhone As String)
If Len(strCheckPhone) <> 7 Then
MsgBox ("The Phone Number is Incorrect")
txtPhone.SetFocus
txtPhone.SelStart = 0
txtPhone.SelLength = Len(txtPhone)
End If
End Function
It gives an runtime error '424' object required on the "txtPhone.SetFocus" line. The message box pops up fine and everything. Any help would be great thank you.