A
Abay
I have a form that displays filtered info from a table .. part of the filter
is the current "system month". My question is how do I code this ..
currently I have the month "hard coded" but would like to be able to
automatically extract the data without having to change the code each month.
My code is as follows:
Private Sub Form_Load()
If FilterOptions = 1 Then
Me.Filter = "servicedatetime like '10/*/04' and itemtype like
'contract*' and showcon = 'y'"
Me.FilterOn = True
End If
End Sub
I know I can get "to-days date" using date(), don't know how to extract part
of it. Have looked at using the Datepart function, (looked it up in Help)
but don't see how I can apply it here .. any suggestions would be much
appreciated, also any suggestions on books I can buy and educate myself more
on VB for access would be much appreciated .. I currently have "Teach
yourself VB for Access" which is great for the basics and that's about all
....thanks in advance.
Abay
is the current "system month". My question is how do I code this ..
currently I have the month "hard coded" but would like to be able to
automatically extract the data without having to change the code each month.
My code is as follows:
Private Sub Form_Load()
If FilterOptions = 1 Then
Me.Filter = "servicedatetime like '10/*/04' and itemtype like
'contract*' and showcon = 'y'"
Me.FilterOn = True
End If
End Sub
I know I can get "to-days date" using date(), don't know how to extract part
of it. Have looked at using the Datepart function, (looked it up in Help)
but don't see how I can apply it here .. any suggestions would be much
appreciated, also any suggestions on books I can buy and educate myself more
on VB for access would be much appreciated .. I currently have "Teach
yourself VB for Access" which is great for the basics and that's about all
....thanks in advance.
Abay