Queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have a datasheet with birthdates as one of its fields and I want only
the records that have birthdates in the current month, how do I set that
expression up?
 
thanks a lot it works. I tried :
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub
 
Hi Trent,

Base your datasheet on a query. Use a criteria like this, for the BirthDate
field:

Month([BirthDate])=Month(Date())


The system date is given by: Date()
The numeric month for the system date is: Month(Date())
(This expression currently evaluates to 8 for August).

Month([BirthDate]) will return the month of a given birthdate entry.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Back
Top