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

access 97: option group and runtime error message 13

P: n/a
hi,

i have this form with the option filter. for some reason, whenever the
user
chooses OptCreateFilter = 3, they receive an error message "type
mismatch 13."
i looked at the data type of all three variables ([Created],
[AutoCreated], [CreatedMoved])
and they are all YES/NO data types.

then i made a sql workaround from the query to filter out both
[Created] and [AutoCreated]
fields. of course it did not work.
what am i doing wrong here?

thanks in advance, jung

Private Sub OptCreateFilter_AfterUpdate()

If Me![OptCreateFilter] = 1 Then
Me.Filter = ""
Me.FilterOn = False
ElseIf Me![OptCreateFilter] = 2 Then
Me.Filter = "[Created] = -1"
Me.FilterOn = True
ElseIf Me![OptCreateFilter] = 3 Then
Me.Filter = "[Created] = 0" And Me.Filter = "[AutoCreated] =
0"
Me.FilterOn = True
ElseIf Me![OptCreateFilter] = 4 Then
Me.Filter = "[AutoCreated] = -1"
Me.FilterOn = True
ElseIf Me![OptCreateFilter] = 5 Then
Me.Filter = "[CreatedMoved] = -1"
Me.FilterOn = True
End If
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 7 Apr 2004 07:04:34 -0700, pi******@yahoo.fr (JMCN) wrote:

This is bad:
Me.Filter = "[Created] = 0" And Me.Filter = "[AutoCreated] = 0"

Speculating what you wanted to do is to filter for Created to be 0 and
at the same time AutoCreated to be 0 as well, the filter should be:
Me.Filter = "[Created] = 0 And [AutoCreated] = 0"

Less is more - in this case.

-Tom.

hi,

i have this form with the option filter. for some reason, whenever the
user
chooses OptCreateFilter = 3, they receive an error message "type
mismatch 13."
i looked at the data type of all three variables ([Created],
[AutoCreated], [CreatedMoved])
and they are all YES/NO data types.

then i made a sql workaround from the query to filter out both
[Created] and [AutoCreated]
fields. of course it did not work.
what am i doing wrong here?

thanks in advance, jung

Private Sub OptCreateFilter_AfterUpdate()

If Me![OptCreateFilter] = 1 Then
Me.Filter = ""
Me.FilterOn = False
ElseIf Me![OptCreateFilter] = 2 Then
Me.Filter = "[Created] = -1"
Me.FilterOn = True
ElseIf Me![OptCreateFilter] = 3 Then
Me.Filter = "[Created] = 0" And Me.Filter = "[AutoCreated] =
0"
Me.FilterOn = True
ElseIf Me![OptCreateFilter] = 4 Then
Me.Filter = "[AutoCreated] = -1"
Me.FilterOn = True
ElseIf Me![OptCreateFilter] = 5 Then
Me.Filter = "[CreatedMoved] = -1"
Me.FilterOn = True
End If


Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.