George-Bowyer
Registered User.
- Local time
- Today, 05:28
- Joined
- Dec 21, 2012
- Messages
- 178
I have a sub-form that users can change the records displayed by choosing from 2 3-button option groups.
I then use two nested select cases to choose an sql statement for the recordsource of the sub form.
I want users to be able to enter dates into 2 fields.
When I use the SQL in a query, the recordset is updateable, but when I use the 'same' (slightly edited for VBA use) sql as RecordSource in the form it is non-updateable.
Can some one let me know why, please?
Thanks,
George
I then use two nested select cases to choose an sql statement for the recordsource of the sub form.
I want users to be able to enter dates into 2 fields.
When I use the SQL in a query, the recordset is updateable, but when I use the 'same' (slightly edited for VBA use) sql as RecordSource in the form it is non-updateable.
Can some one let me know why, please?
Code:
strSQL = "SELECT tblAnnualReturn.fldClubID, tblOrganisations.FldOrgName, tblAnnualReturn.fldDateRecieved, tblAnnualReturn.fldDateProcessed, tblAnnualReturn.fldYear" & _
" FROM (tblAnnualReturn INNER JOIN tblClubAssociations ON tblAnnualReturn.fldClubID = tblClubAssociations.fldClubOrgID) INNER JOIN tblOrganisations ON tblClubAssociations.fldClubOrgID = tblOrganisations.OrganisationID" & _
" WHERE (((tblAnnualReturn.fldDateRecieved) Is Null) And ((tblAnnualReturn.fldYear) = DatePart('yyyy', Date())) And ((tblClubAssociations.fldAssocOrgID) = 307))" & _
" ORDER BY tblOrganisations.FldOrgName;"
Thanks,
George