J
J. Keggerlord
Private Sub cmdCreatePath_Click()
Dim strDateCons As String
<bunch of my code that is (surprisingly) working like it should>
strDateCons = DatePart(yyyy, Me.txtDateEntered) & "-" & DatePart(mm,
Me.txtDateEntered) & _
"-" & DatePart(dd, Me.txtDateEntered) Debug.Print strDateCons
End Sub
When I click the magic button... nuffin'! I get an error message that
states "Compile error: Variable not defined" and it highlights the 'yyyy'
part of my first DatePart statement.
What I actually wanted it to do was to take the date from txtDateEntered
(which is a populated field when I try this) and return a date construct of
yyyy-mm-dd which then will become part of another string. Any ideas what I
might be doing wrong? Major thanks in advance to anyone who can help with
this!
Dim strDateCons As String
<bunch of my code that is (surprisingly) working like it should>
strDateCons = DatePart(yyyy, Me.txtDateEntered) & "-" & DatePart(mm,
Me.txtDateEntered) & _
"-" & DatePart(dd, Me.txtDateEntered) Debug.Print strDateCons
End Sub
When I click the magic button... nuffin'! I get an error message that
states "Compile error: Variable not defined" and it highlights the 'yyyy'
part of my first DatePart statement.
What I actually wanted it to do was to take the date from txtDateEntered
(which is a populated field when I try this) and return a date construct of
yyyy-mm-dd which then will become part of another string. Any ideas what I
might be doing wrong? Major thanks in advance to anyone who can help with
this!