urjudo
asked on
Query syntax
Hi Experts,
I have a query question. I have a Attorney table that have fields: Last Name, First name, Firm, address etc. I want to have user to be able to search either the attorney's last name or the firm to lookup if this attorney or this firm is existing in the table but I don't want to create two different command buttons for this search, I want to create one command button for this search. How do I do that? I don't want to do an union query because I want users to be able to add or edit in the search form. here is my query:
SELECT tblAttorney.ATYFIRST, tblAttorney.ATYLAST, tblAttorney.ATYFIRM
FROM tblAttorney
WHERE (((tblAttorney.ATYLAST) Like [Please Enter Attorney Last Name] & "*"));
Thanks
I have a query question. I have a Attorney table that have fields: Last Name, First name, Firm, address etc. I want to have user to be able to search either the attorney's last name or the firm to lookup if this attorney or this firm is existing in the table but I don't want to create two different command buttons for this search, I want to create one command button for this search. How do I do that? I don't want to do an union query because I want users to be able to add or edit in the search form. here is my query:
SELECT tblAttorney.ATYFIRST, tblAttorney.ATYLAST, tblAttorney.ATYFIRM
FROM tblAttorney
WHERE (((tblAttorney.ATYLAST) Like [Please Enter Attorney Last Name] & "*"));
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The query will allow for appends, so if you can't, it might be that you have set the form's property AllowAdditions to False.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you all!
you're welcome ~ happy to help
@urjdo,
Selecting every suggestion as THE answer doesn't help anyone especially when the suggestions conflict. I understand that you want to reward people for attempting to help but this isn't the way. It is better for all of us if you select the suggestion that actually worked for you, if one did or explain how you combined several suggestions to get to the answer. Then you can simply mark the other suggestions as helpful to award participation points if that is what you want to do.
Selecting every suggestion as THE answer doesn't help anyone especially when the suggestions conflict. I understand that you want to reward people for attempting to help but this isn't the way. It is better for all of us if you select the suggestion that actually worked for you, if one did or explain how you combined several suggestions to get to the answer. Then you can simply mark the other suggestions as helpful to award participation points if that is what you want to do.
ASKER
Thanks that's what I need but it seems I can not add a new record on the form with this query, any ideas?