Append Query Date Criteria Problem.
- From: "Hunter57" <Pwood57@xxxxxxxxx>
- Date: 7 Apr 2007 17:49:23 -0700
I need some help with an append query. The date criteria is not
working in the append query, but it works fine when I change it to a
Select query. Also, I can remove the problem Column in the RAD, or
just remove the critera in the column and the append query works fine.
I am using a continuous form to enter Sunday School attendance. I
want my query to add all the information for a particular class on a
particular day and the user just has to enter the Attendance. My
query has two criteria, which are obtained from unbound controls on
the form: cboSSClassID, and txtSSClassDate (the one giving me the
problem). All of my table fields and form controls for this field are
set to use this input mask: 99/99/0000;0;_.
I use a command button to open the query with the following code:
Private Sub btnAddNewRecords_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "QASSAttendRec"
DoCmd.SetWarnings True
End Sub
Here is my Query SQL:
INSERT INTO tblSSAttendance ( SSClassDate, SSClassID, SSMemberID,
MemberID, ContactID )
SELECT tblSSAttendance.SSClassDate, tblSSAttendance.SSClassID,
tblSSAttendance.SSMemberID, tblSSAttendance.MemberID,
tblSSAttendance.ContactID
FROM tblSSClasses INNER JOIN tblSSAttendance ON tblSSClasses.SSClassID
= tblSSAttendance.SSClassID
WHERE (((tblSSAttendance.SSClassDate)=[Forms]![frmSSAttendEntry]!
[txtSSClassDate]) AND ((tblSSAttendance.SSClassID)=[Forms].
[frmSSAttendEntry].[cboSSClassID]));
I have two other command buttons which filter by query: one to show
the records just added, and another to show all data in the table.
They use the exact same date criteria and work well.
I am using MS Access 2003 in 2000 format with Windows XP.
I would appreciate your help.
Hunter57
.
- Follow-Ups:
- Re: Append Query Date Criteria Problem.
- From: Allen Browne
- Re: Append Query Date Criteria Problem.
- Prev by Date: Re: Date range for a query
- Next by Date: Re: Update Query Round Short Time Field
- Previous by thread: Re: SQL code that looks for Duplicates
- Next by thread: Re: Append Query Date Criteria Problem.
- Index(es):