By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,107 Members | 1,323 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,107 IT Pros & Developers. It's quick & easy.

Problem With Multiple Form Filters

P: 22
Hi, I have a form that loads with a filter:

Expand|Select|Wrap|Line Numbers
  1.     Me.Filter = "Format = 'Digital'"
  2.     Me.FilterOn = True
  3.  
This filter works fine. Each "Digital" record has a filepath field which is displayed on the form. Upon pressing a button on the form (Check) each filepath is checked to see whether it is still valid. Those which are not valid have their "valid path" field unchecked. The valid path field has a Yes/No format and is displayed as a check box on forms. When the filepath is valid the check box is checked and when it is invalid it is unchecked. At the end of the "Check" procedure I want the form's filters updated so that only the digital records without valid filepaths are displayed. However the code I wrote for this results in an error when run: "Run-time error '13': Type mismatch". Can you see any problems in my code?

Expand|Select|Wrap|Line Numbers
  1.     Me.Filter = "[Format] = 'Digital'" And "[Valid Path] = '0'"
  2.  
Thanks.
Jan 12 '08 #1
Share this Question
Share on Google+
2 Replies


JKing
Expert 100+
P: 1,206
Hi, I have a form that loads with a filter:

Expand|Select|Wrap|Line Numbers
  1.     Me.Filter = "Format = 'Digital'"
  2.     Me.FilterOn = True
  3.  
This filter works fine. Each "Digital" record has a filepath field which is displayed on the form. Upon pressing a button on the form (Check) each filepath is checked to see whether it is still valid. Those which are not valid have their "valid path" field unchecked. The valid path field has a Yes/No format and is displayed as a check box on forms. When the filepath is valid the check box is checked and when it is invalid it is unchecked. At the end of the "Check" procedure I want the form's filters updated so that only the digital records without valid filepaths are displayed. However the code I wrote for this results in an error when run: "Run-time error '13': Type mismatch". Can you see any problems in my code?

Expand|Select|Wrap|Line Numbers
  1.     Me.Filter = "[Format] = 'Digital'" And "[Valid Path] = '0'"
  2.  
Thanks.
Hi there,

Give this a try.

Expand|Select|Wrap|Line Numbers
  1.     Me.Filter = "[Format] = 'Digital' AND [Valid Path] = false"
  2.  
Jan 12 '08 #2

P: 22
Thanks alot! The examples the access help gives are very limited.

Hi there,

Give this a try.

Expand|Select|Wrap|Line Numbers
  1.     Me.Filter = "[Format] = 'Digital' AND [Valid Path] = false"
  2.  
Jan 12 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.