It sounds to me like you want to be able to append only those records from a specific month.
To do that, create a field in your query called "AppendMonth" and put this expression on the Field line:
AppendMonth:(DatePart("m", [DateField]))
This will show you a single number that is the month the record is for.
Then pass this parameter to the append query button. Either use a combo box on the form, and type in 1, 2, 3, 4, 5, etc. and have the user select the month number. In the criteria line for the AppendMonth field in your query, put this:
[Forms]![frmMyAppendForm].[cboAppendCombo]
Or do this to pass it from the combo box:
Dim iMonth As Integer
Dim sLink As String
iMonth = Me.cboAppendCombo
sLink = "[AppendMonth] = " & iMonth
DoCmd.OpenQuery "qryAppendMonthQueryName",,, sLink
Put sLink in the WHERE clause section of the line. I can't remember where that is.
Did that help?
mmcdonal
|