C
Charles
Hey I have a list box that checks a box for criteria as you type it in
and requeries as you type. It works great and the user can type in any
part of the record and results update as the user types, but my one
problem is that there are not enough criteria fields in the design
mode(SQL edit mode) of the list box. I would like it to search even
more records but ive run out of slots for criteria! How can i
incresase the amount without haveing to type in additional crieteria in
SQL view because that will be a real hassle in comparison to useing the
nice query-looking format. I included the SQL for the box below so you
can see what I mean. Thanks in advance for any help!
Code:
SELECT Addresses.FamilyID, Addresses.FmlyName, Campers.FirstName,
Campers.MiddleName, Campers.LastName, Campers.Gender, Campers.Status,
Campers.OtherInformation
FROM Addresses INNER JOIN Campers ON Addresses.FamilyID =
Campers.FamilyID
GROUP BY Addresses.FamilyID, Addresses.FmlyName, Campers.FirstName,
Campers.MiddleName, Campers.LastName, Campers.Gender, Campers.Status,
Campers.OtherInformation, Addresses.EPhone, Addresses.Status,
Addresses.WorkPhone, Addresses.CellPhone, Addresses.HomePhone
HAVING (((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Addresses.EPhone) Like
"*"+[Forms]![FilterOne]![Text22]+"*") AND
((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active") AND
((Addresses.WorkPhone) Like "*"+[Forms]![FilterOne]![Text22]+"*")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active") AND
((Addresses.CellPhone) Like "*"+[Forms]![FilterOne]![Text22]+"*")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active") AND
((Addresses.HomePhone) Like "*"+[Forms]![FilterOne]![Text22]+"*")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND ((Campers.FirstName)
Like "*"+[Forms]![FilterOne]![Text22]+"*") AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND ((Campers.MiddleName)
Like "*"+[Forms]![FilterOne]![Text22]+"*") AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND ((Campers.LastName)
Like "*"+[Forms]![FilterOne]![Text22]+"*") AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND ((Addresses.FmlyName)
Like "*"+[Forms]![FilterOne]![Text22]+"*") AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Campers.OtherInformation) Like
"*"+[Forms]![FilterOne]![Text22]+"*") AND
((Addresses.Status)="Active"));
-Charles
and requeries as you type. It works great and the user can type in any
part of the record and results update as the user types, but my one
problem is that there are not enough criteria fields in the design
mode(SQL edit mode) of the list box. I would like it to search even
more records but ive run out of slots for criteria! How can i
incresase the amount without haveing to type in additional crieteria in
SQL view because that will be a real hassle in comparison to useing the
nice query-looking format. I included the SQL for the box below so you
can see what I mean. Thanks in advance for any help!
Code:
SELECT Addresses.FamilyID, Addresses.FmlyName, Campers.FirstName,
Campers.MiddleName, Campers.LastName, Campers.Gender, Campers.Status,
Campers.OtherInformation
FROM Addresses INNER JOIN Campers ON Addresses.FamilyID =
Campers.FamilyID
GROUP BY Addresses.FamilyID, Addresses.FmlyName, Campers.FirstName,
Campers.MiddleName, Campers.LastName, Campers.Gender, Campers.Status,
Campers.OtherInformation, Addresses.EPhone, Addresses.Status,
Addresses.WorkPhone, Addresses.CellPhone, Addresses.HomePhone
HAVING (((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Addresses.EPhone) Like
"*"+[Forms]![FilterOne]![Text22]+"*") AND
((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active") AND
((Addresses.WorkPhone) Like "*"+[Forms]![FilterOne]![Text22]+"*")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active") AND
((Addresses.CellPhone) Like "*"+[Forms]![FilterOne]![Text22]+"*")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active") AND
((Addresses.HomePhone) Like "*"+[Forms]![FilterOne]![Text22]+"*")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND ((Campers.FirstName)
Like "*"+[Forms]![FilterOne]![Text22]+"*") AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND ((Campers.MiddleName)
Like "*"+[Forms]![FilterOne]![Text22]+"*") AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND ((Campers.LastName)
Like "*"+[Forms]![FilterOne]![Text22]+"*") AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND ((Addresses.FmlyName)
Like "*"+[Forms]![FilterOne]![Text22]+"*") AND
((Campers.Status)="Active") AND ((Addresses.Status)="Active")) OR
(((Addresses.FamilyID)=[Campers].[FamilyID]) AND
((Campers.Status)="Active") AND ((Campers.OtherInformation) Like
"*"+[Forms]![FilterOne]![Text22]+"*") AND
((Addresses.Status)="Active"));
-Charles