-----Original Message-----
I need to create a Report every month with the people that
their birthday is in that month. I would like to type the
month that I want to print. Help please
.
Instead of a text box, why not use a list box on your
form. It's probably easier for your user and eliminates
typographical errors.
Use the Wizard to create the list box. Make the source a
table with two fields: MonthID (long integer) and
strMonth (text). The SQL is SELECT [tblMonth].[MonthID],
[tblMonth].[strMonth] FROM [tblMonth] ORDER BY
[MonthID];. Leave the bound column as 1, which is MonthID.
Base your report on a query which contains the birthdate
field and whatever other fields you want. Do a calculated
field in the query, MyMonth: Month([BirthDate]) and a
criteria for that field of [Forms]![frmSelectMonth]!
[lstMonths].
The On Click event of the list box calls the report, using
something like:
Private Sub lstMonths_Click()
Dim stDocName As String
stDocName = "rptBirthday"
DoCmd.OpenReport stDocName, acPreview
End Sub
Roxie Aho
roxiea at usinternet.com