S
steve
I am doing a db to keep track of my classmates. I have written two queries,
one for men and one for women. What I am trying to do is get one query that
sorts alphabetically by the original last name. The men's have not changed
but the womens have for the most part so I put in a MaidenName field to
store the original name.
here is the SQL for the queries.
qryMaidenName
SELECT tblDemographics.MaidenName, tblDemographics.LastName,
tblDemographics.FirstName, tblDemographics.MI, [FirstName] & " " & [MI] & "
" & [MaidenName] & " " & [LastName] AS FullName
FROM tblDemographics
WHERE (((tblDemographics.MaidenName) Is Not Null) AND
((tblDemographics.Deceased)=0));
qryMaleNames
SELECT tblDemographics.LastName, tblDemographics.FirstName,
tblDemographics.MI, [FirstName] & " " & [MI] & " " & [MaidenName] & " " &
[LastName] AS FullName
FROM tblDemographics
WHERE (((tblDemographics.MaidenName) Is Null) AND
((tblDemographics.Deceased)=0));
This may be a case of me just not looking at this in the right way.
Any help appreciated as always.
TIA
Steve
one for men and one for women. What I am trying to do is get one query that
sorts alphabetically by the original last name. The men's have not changed
but the womens have for the most part so I put in a MaidenName field to
store the original name.
here is the SQL for the queries.
qryMaidenName
SELECT tblDemographics.MaidenName, tblDemographics.LastName,
tblDemographics.FirstName, tblDemographics.MI, [FirstName] & " " & [MI] & "
" & [MaidenName] & " " & [LastName] AS FullName
FROM tblDemographics
WHERE (((tblDemographics.MaidenName) Is Not Null) AND
((tblDemographics.Deceased)=0));
qryMaleNames
SELECT tblDemographics.LastName, tblDemographics.FirstName,
tblDemographics.MI, [FirstName] & " " & [MI] & " " & [MaidenName] & " " &
[LastName] AS FullName
FROM tblDemographics
WHERE (((tblDemographics.MaidenName) Is Null) AND
((tblDemographics.Deceased)=0));
This may be a case of me just not looking at this in the right way.
Any help appreciated as always.
TIA
Steve