473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

access 97: option group and runtime error message 13

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
1 1848
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Barb | last post by:
Hi there, I sincerely hope that someone out there can help. I have two instances of the SQL 2000 Desktop Engine running. One is on my local machine for development and the other is on another...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
49
by: Yannick Turgeon | last post by:
Hello, We are in the process of examining our current main application. We have to do some major changes and, in the process, are questionning/validating the use of MS Access as front-end. The...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
5
by: Raterus | last post by:
I'm just throwing this error out for my sanity, I've seen posts about this, but never solutions. I'm using VS.NET 2003, Framework 1.1, and I'm getting a random error about every 1 out of 10 times...
16
by: Brad | last post by:
After compiling my asp.net project I'm receiving a "BC31011 - Access is denied" error when attempting to run or debug. The only thing that seems to resolve problem is IISReset. After a reset my...
9
by: YYZ | last post by:
After reading many messages in this group, it seems that the preferred setting for this is ON. Okay, I did that in my project (first with ..Net -- long time VB6 developer) and now a bunch of...
17
by: Neil | last post by:
A client of mine likes some of the new bells and whistles in Access 2007, and is thinking about converting our A03 format MDB to an A07 format file. However, while some of the users have A07, many...
1
by: resqtech | last post by:
I am having an issue with an Access Database that worked at one time and after a Windows Update that screwed up the profile it stopped working. The following is what VB is stating causes the error. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.