To develop a 'filter-by-form' equivalent would be a major undertaking.
If you can cut down your filtering to two or three fields you could build a SQL Select statement in code and use that as your recordsource (or build a filter stament on code and apply that).
Or you could use a parameter...
Don't even try.
Provide the user with separate texboxes for firstname and lastname and then, if you must, join the entries together to give you the format you want.
But I can't imagine that you really want to store the name in this way. It would make searching unnecessarily complicated.
What do you mean by
' lets call it 'recon#'
In what sense does a record have a name?
It would always be 'the row that is selected' as there is always a row selected (assuming a row exists)
And you want to copy it where? to the clipboard?
Run this sub to enter ther records. Make sure you use your own table and field names.
Sub EnterDates()
Dim dt As Date
Dim db As Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tablename", dbOpenDynaset)
For dt = #1/1/2004# To #12/31/2010#
rs.AddNew...
Asking the user to enter month/year in a parameter prompt is inviting problems.
If you need to do this then you should use a form to capture the month - maybe use a drop down list to let the user pick from it.
'To be qualified on 747 Employee must have completed ENG, AVI, and FAM.'
Something like this...
SELECT EmpID, Sum(Abs([Type]='Eng')) AS Qeng, Sum(Abs([type]='avi')) AS qavi, Sum(Abs([type]='fam')) AS qfam
FROM [mytablenamehere]
where fleet = 747
GROUP BY EmpId
HAVING...
Create separate queries for each qualification. Each query should contain the same fields in the result, plus an extra column to indicate the qualification such as ...
Qual:747
Once you have created the individual queries go into the SQL view of a new query and enter:
Select * from qry727...
SElect * from tbalA left join
(Select tblB.* from tblB inner join
(select BId, Max(BDate) as mdate group by BId) as q1
On tblB.BId = Q1.BId and tblB.Badate = q1.mdate) as q2
On tblA.Aid = Q2.Aref
YOu have to find the max date for each Id, then get the record containing that value and then join...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.