vavroom
01-31-2002, 09:02 AM
I made a temporary search form and have two potential criterias, one is Contact Name, the other is Staff.
I used an unbound form with two combo boxes in it. I then used an option frame giving the choice to search by Contact Name, or by Staff. I used the wizards to get the proper string for each of those two criterias.
My problem is now to provide the option to search with both fields as criterias. I suspect my problem is one of using the appropriate quotation mark, apostrophe, whatever. I just cant' make it happen. Could you enlighten me as the proper way to join the following two bits with an "AND"?
stLinkCriteria = "[fldStaff]=" & Me![cmbStaff]
stLinkCriteria = "[fldPeopleID]=" & Me![cmbName]
I tried the following, but it's not working, as it's asking me for input on both Me![cmbName] and Me![cmbStaff]
stLinkCriteria = "'[fldPeopleID]=' & Me![cmbName] And '[fldStaff]=' & Me![cmbStaff]"
I searched in the Help files, but I can't make sense of what the proper order of things should be.
I used an unbound form with two combo boxes in it. I then used an option frame giving the choice to search by Contact Name, or by Staff. I used the wizards to get the proper string for each of those two criterias.
My problem is now to provide the option to search with both fields as criterias. I suspect my problem is one of using the appropriate quotation mark, apostrophe, whatever. I just cant' make it happen. Could you enlighten me as the proper way to join the following two bits with an "AND"?
stLinkCriteria = "[fldStaff]=" & Me![cmbStaff]
stLinkCriteria = "[fldPeopleID]=" & Me![cmbName]
I tried the following, but it's not working, as it's asking me for input on both Me![cmbName] and Me![cmbStaff]
stLinkCriteria = "'[fldPeopleID]=' & Me![cmbName] And '[fldStaff]=' & Me![cmbStaff]"
I searched in the Help files, but I can't make sense of what the proper order of things should be.