Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: 13-type mismatch error

40 views
Skip to first unread message

Douglas J Steele

unread,
Nov 28, 2005, 12:13:19 PM11/28/05
to
Error 13 (type mismatch) occurs when the program is looking for data in one
format, and you provide data in a different format (such as it's looking for
a numeric value and you give it a text value)

Without knowing what the database is doing when the error's raised, there's
really no specific advice we can give you as to how to overcome the error.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"rigby" <ri...@discussions.microsoft.com> wrote in message
news:7A09BD28-75ED-434A...@microsoft.com...
> I am very new to access. i downloaded (and paid for) a database template
> which very closely suits this company's needs. i am now trying to
customize
> it. all i did, was move a textbox in design view of a form from the bottom
of
> a list to the top. then, when ever i opened the form, i would get the
error
> message "13-type mismatch"
>
> Can anyone help me fix this. i do have a backup copy which is fine, but i
> still need to make changes without disrupting the database's operation. i
> know nothing of 'modules' and 'visual basic' . do i need to?
>
> Thanks


Tom Wickerath

unread,
Nov 28, 2005, 9:03:39 PM11/28/05
to
Hi Rigby,

You might try searching your database code for references to "recordset", as
in "Dim rst As Recordset" (rst is the name of the variable; it can be a
different variable as well). To search the code, open your database and then
press the ALT and F11 keys together. Then click on Edit > Find... and enter
the term "Recordset" (without the quotes). Select Current Project as the
search option. If you find any lines similar to:

Dim VariableName As Recordset

then determine whether you need an ADO or a DAO recordset. If you see code
that declares a database variable, as in Dim db As Database, and then sets
the recordset like this: Set rst = db.OpenRecordset, then this is definately
DAO code. Here is an article that might be helpful for you:

ADO and DAO Library References in Access Databases
http://www.access.qbuilt.com/html/gem_tips1.html

There are other methods that are common to both libraries as well. The
downloadable database includes a query that lists the common methods.


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

rigby

unread,
Nov 29, 2005, 4:51:03 AM11/29/05
to
Thanks you both Tom and Douglas.

I feel way out of my league here. I have tried, Tom, to find the 'Recordset'
which i found and it read: 'Dim rs As Recordset' and then above it, it read
'Dim db As Database'. i am unclear as to what i need to do to change it?
Thank you for your time.

Rigby

rigby

unread,
Nov 29, 2005, 5:41:02 AM11/29/05
to
HEY!!! IT WORKED!!!

i'm honestly not entirely sure what i did, but i followed what that 'gem
tips' site said to do, and it worked, the error message didnt come up again.
you are legend, man. thanks

i will definitely look you up again if i have another problem (which no
doubt i will)
cheers
rigby

Tom Wickerath

unread,
Nov 29, 2005, 1:34:02 PM11/29/05
to
Hi Rigby,

I'm glad to hear that you got it to work. Thanks for letting us know.

Good luck on your project!

rigby

unread,
Nov 28, 2005, 11:30:04 AM11/28/05
to

rigby

unread,
Dec 1, 2005, 6:46:02 AM12/1/05
to
i know i have asked this before, but i cannot find the answer again.
i am in my main switchboard and try open another form. it comes up reading
"Error in module Form_Open" - '13-Type mismatch'. i have tried 'gems tips'
and still nothing helps. i need to figure out how to fix this please. i am so
stuck. HELP!

Thank you!

Brendan Reynolds

unread,
Dec 1, 2005, 7:43:02 AM12/1/05
to
It would appear that there is an error in the VBA code in the Form_Open
event procedure of the form you are trying to open. You'll likely need to
post that code before anyone can tell you what the problem is.

--
Brendan Reynolds

"rigby" <ri...@discussions.microsoft.com> wrote in message

news:EA8D745F-847C-4B4F...@microsoft.com...

rigby

unread,
Dec 1, 2005, 11:16:08 AM12/1/05
to
Brendan
Finally, someone who can help me, what do you mean by post that code? i have
managed to change it so i dont get the same error message anymore. but
instead i get a new one, but i dont know VBA (i wish i did). this is the new
error message:
2465-Microsoft Office Access cant find the field 'Category 08_Label'referred
to in your expression

and then there's this other error message (i seem to be making a mess of
things):
...oh, actually its very similar but referring to the field 'Label 107'
instead. i bought this database online and wanted to customize it to our
company needs, but when i make adjustments, i create errors. please help me!!!

Thanks
Rigby

Brendan Reynolds

unread,
Dec 1, 2005, 4:00:21 PM12/1/05
to
I'm afraid I can't help you unless you can provide the information that
would enable me to do so. There's no way for me to know what expression
might be causing that error message. Try to think about what you were doing
before the error message first appeared. Look at the things you changed. One
of those things has a reference to something called 'Category 08_Label' that
Access can't find - or can't find in the context of that expression.

--
Brendan Reynolds


"rigby" <ri...@discussions.microsoft.com> wrote in message

news:FFFB2FD1-48B9-4D6E...@microsoft.com...

rigby

unread,
Dec 2, 2005, 5:42:04 AM12/2/05
to
I deleted some text boxes with their labels which were called 'category 08'
through to 20. i did my best to find them in all forms, tables, queries,
modules, etc and delete any reference to them at all. as far as my limited
knowledge can tell, there is still an expression somewhere referring to it,
coz, well, thats what the error message says. i realise you wouldnt be able
to help much unless you could see it for yourself, but is there no possible
location i am missing that still needs to be erased?
or have i gone about it all wrong and should not have deleted all existence
of these text boxes and their labels??

please, i still need help!?!?!? oh, do i need to know much about VB to do
all this too?

Thanks Brendan
Rigby Smith

Brendan Reynolds

unread,
Dec 2, 2005, 5:52:02 AM12/2/05
to
Check the Filter and Order By properties of the form. You'll find them on
the Data tab of the Properties window in form design view. If you don't see
the Properties window, you can display it by choosing Properties from the
View menu.

--
Brendan Reynolds

"rigby" <ri...@discussions.microsoft.com> wrote in message

news:27EE1288-799B-46DF...@microsoft.com...

rigby

unread,
Dec 2, 2005, 6:15:03 AM12/2/05
to
I have found those properties, filter: [Company] = "Ibs" and Order By: Company
is this where my problem lies?
Now I know this is getting off the subject, but, another difficulty i'm
having is, when i enter info into a field, and i want it to be left the way i
entered it, like, not change the case of the words, but it keeps changing it.
i tried changing the IME sentence mode, is that right? there are no Input
Masks on these fields that i can find anywhere. i'm trying to locate any
reference to them in VB now

Tom Wickerath

unread,
Dec 3, 2005, 7:08:02 AM12/3/05
to
Hi Rigby,

> what do you mean by post that code?

Brendan was suggesting that you post the code for the Form_Open event
procedure. Open the form in design view. Then click on View > Properties to
display the properties dialog if it is not already displayed. You should see
the word "Form" in the blue title bar of the properties dialog. If not, click
on the small black square in the upper left-hand corner of the form. Select
the Event tab of the properties dialog. Do you see anything listed on the
line labelled "On Open"? If so, click into this box. Then click on the
ellipses button (the button with the three small dots, which will become
visible as soon as you click into the box). This should take you to the
Form's Open procedure (macro, code or expression). If you find a macro,
record the actions for the macro and type them into a reply. If you find
code, copy the code and paste it into a reply.

> this is the new error message:
> 2465-Microsoft Office Access cant find the field 'Category 08_Label' referred
> to in your expression

Here is a trick that may help you locate this control:

1.) Close this form, and any other objects (tables, queries, forms, reports,
macros, or modules) that might be open.

2.) Click on Tools > Analyze > Documenter

3.) Select the "All Object Types" tab. Click the Select All button. Click on
the Options... button. You want to select everything, so place checks in the
first three options, and select the last option button it the two remaining
groups. Click on OK to dismiss this dialog. Click on OK one more time to run
the documenter.

4.) When the documenter is complete, a report should be displayed. Click on
File > Export. Select Rich Text Format (*.rtf) in the Save as type dropdown.
Give the file a name and save to a folder.

5.) Find this new file using Windows Explorer. Open it in Word. Use Edit >
Find. Search the document for Category 08_Label. Make a note of any locations
that are found. Repeat the search, this time using Label 107 as the search
term.

Tom

0 new messages