Answer to Question #6951 in Visual Basic for Jenny Richardson

Question #6951
This sub should add time and date to a text box on click, but I keep getting "sub or function not defined". I've checked all spellings and retyped,:

Private Sub cmdMataFstamp_Click()

Dim Temp As String

On Error GoTo Err_cmdMataFstamp_Click

fsub_mrrc.txtMataF_Notes.SetFocus
fsub_mrrc.txtMataF_Notes.SelLength = 0

If IsNull(fsub_mrrc.txtMataF_Notes) Then
Temp = ""
Else
Temp = Me.txtMataF_Notes & (Chr$(13) + Chr$(10)) & (Chr$(13) + Chr$(10))
End If

Temp = Temp & Now & " - " & " MF " & ":" & (Chr$(13) + Chr$(10))
fsub_mrrc.txtMataF_Notes = Temp
fsub_mrrc.txtMataF_Notes.SelStart = Len(fsub_mrrc.txtMataF_Notes)
fsub_mrrc.txtMataF_Notes.SelLength = 0

Exit_cmdMataFstamp_Click:
Exit Sub

Err_cmdMataFstamp_Click:
Select Case Err
Case Else
ErrorMsg "[fsub_mrrc.cmdMataFstamp_Click()]", Error$, Err
Resume Exit_cmdMataFstamp_Click
End Select

End Sub
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS