|
-
Jun 15th, 2000, 12:23 AM
#1
Thread Starter
Junior Member
Does anybody knows how to search in a database for a field that matches with this:
Month(date) = Month(field) and Day(Date) = Day(Field)
I want the program to pick the fields that match with todays month and day values
-
Jun 15th, 2000, 02:23 PM
#2
Hyperactive Member
Hello ALFA117,
Hopefully is this where you searching for:
Private Sub Form_Load()
Dim DB As Database
Dim RS As Recordset
Set DB = OpenDatabase("c:\q.mdb")
Set RS = DB.OpenRecordset("select * from DateTable")
RS.MoveFirst
While Not RS.EOF
If Month(Date) = Month(RS!DateField) And Day(Date) = Day(RS!DateField) Then DoSomeThing
RS.MoveNext
Wend
End Sub
Nice regards,
Michelle.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|