Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Problems

Status
Not open for further replies.

iXPhound

Technical User
Feb 25, 2001
146
US
Hi All:

Ok here we go. First off I am still learning so be gentle. I am trying to use a filter in the following manner:

If HUID.Value <> &quot;&quot; Then
DoCmd.OpenForm strfrmName, acNormal, , , acFormEdit, acWindowNormal
Forms!frmWeapons.Filter = &quot;HUIDWeapon = &quot; & Forms!frmEmployees!HUID.Value & &quot;&quot;
Forms!frmWeapons.FilterOn = True
End If

If, in the respective tables, I set HUID and HUIDWeapon to a number data type the above filter will work. However if I change the data type to text I will receive an error message stating that &quot;You have cancelled the previous operation&quot;. If I debug the .Filter line is highlighted.

Any ideas????

TIA!!!!!!!!!!!!!!!!!!!!!!!!!!

-George
 
Hi George,
Please see my response in thread707-62119. It appears to be the same issue here. If you have any further questions (or if you can't use the thread because you're not subscribed to the forum.. not sure if it will let you or not) please let me know :)
 
Katerine,

I have had this problem in the past where I needed the single quote sometimes and not other times but I never noticed the reason. This worked and it finally sunk in!!! Thanks!!!!!!

George
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top