Queries

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?
 
G

Guest

thanks a lot it works. I tried :
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
End Sub
 
G

Guest

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
__________________________________________
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top