943,723 Members | Top Members by Rank

Ad:
Jul 28th, 2009
0

run time error "13" type mismatch

Expand Post »
hi!
i'm new here.
i have problem with my database.
i asked my friend to key in data.
then, i want to combine all data together in ms access at my computer.
when i run the system the run time error "13" type mismatch appeared.
i don't know what this mean.
i asked my friend but he also don't know what to do.
can anybody tell me what should i do??
i have to get my system ready before this 10th ogos.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kheoyleon is offline Offline
6 posts
since Jul 2009
Jul 29th, 2009
0

Re: run time error "13" type mismatch

type mismatch. its not match with your type. example: you work with some numeric number. you declare a variable Like
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim a as string
so it show this msg. type mismatch. cause string value is not match with your work. you need to declare like:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim a as Integer
cause integer is for numeric value. same as other. here you not mention what you did. But I think it solve your problem.
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008
Jul 29th, 2009
0

Re: run time error "13" type mismatch

did you mean i have to declare every text box that i use to enter data?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kheoyleon is offline Offline
6 posts
since Jul 2009
Jul 29th, 2009
0

Re: run time error "13" type mismatch

not that. you declare it in general declaration. or you use module.
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008
Jul 30th, 2009
0

Re: run time error "13" type mismatch

why i have to declare?
the error happen when i paste the data into db
not the data that i added through the system
there is no problem if i added data through system
the system still can run
i just want to combine all data in my db
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kheoyleon is offline Offline
6 posts
since Jul 2009
Jul 30th, 2009
0

Re: run time error "13" type mismatch

Click to Expand / Collapse  Quote originally posted by kheoyleon ...
why i have to declare?
I just give u a example. paste your code.
Reputation Points: 14
Solved Threads: 78
Practically a Posting Shark
abu taher is offline Offline
835 posts
since Jul 2008
Jul 30th, 2009
0

Re: run time error "13" type mismatch

i have attach my code.
i have another question.
if the text box that i prepared is shorten than the data entered, can it add all the data in the text box?
last month this problem happened.
a message box appeared said that the text box is to small to enter a large data.
but some of the text box do not have the problem even the data is longer than the text box.
at first, i don't know that data is not added.
when i check the db, i can't find the data.
so i edit the text box to be more longer than before.
but that error still occured.
i changed the data type in db from text to memo.
then it can run well.
you think is this the problem why the type mismatch happen?
Attached Files
File Type: txt EXP.txt (18.2 KB, 59 views)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kheoyleon is offline Offline
6 posts
since Jul 2009
Jul 30th, 2009
0

Re: run time error "13" type mismatch

Hi,

Where you get error, Can u specify? Then only we can find error easily. That is the line in which the error occured.
Last edited by selvaganapathy; Jul 30th, 2009 at 10:49 am.
Reputation Points: 44
Solved Threads: 101
Posting Pro
selvaganapathy is offline Offline
547 posts
since Feb 2008
Aug 1st, 2009
0

Re: run time error "13" type mismatch

Private Sub papar()

LV.ListItems.Clear

maxdata = RS.RecordCount

lblcounter3.Caption = "TOTAL : " & RS.RecordCount & " data"

For i = 1 To maxdata

LV.ListItems.Add , , RS("SERVING_CABINET")
LV.ListItems(i).ListSubItems.Add 1, , RS.Fields("EXCHANGE")
LV.ListItems(i).ListSubItems.Add 2, , RS.Fields("MUKIM")
LV.ListItems(i).ListSubItems.Add 3, , RS.Fields("DAERAH")
LV.ListItems(i).ListSubItems.Add 4, , RS.Fields("ES_WORKING")
LV.ListItems(i).ListSubItems.Add 5, , RS.Fields("ES_FREE")
LV.ListItems(i).ListSubItems.Add 6, , RS.Fields("ADSL_WORKING")
LV.ListItems(i).ListSubItems.Add 7, , RS.Fields("ADSL_FREE")
LV.ListItems(i).ListSubItems.Add 8, , RS.Fields("KAWASAN_PERINDUSTRIAN")
LV.ListItems(i).ListSubItems.Add 9, , RS.Fields("NAMA_SYARIKAT")
LV.ListItems(i).ListSubItems.Add 10, , RS.Fields("ADDRESS")
LV.ListItems(i).ListSubItems.Add 11, , RS.Fields("JENIS_INDUSTRI")
LV.ListItems(i).ListSubItems.Add 12, , RS.Fields("INDUSTRI_SEBUAH")
LV.ListItems(i).ListSubItems.Add 13, , RS.Fields("INDUSTRI_TERES")
LV.ListItems(i).ListSubItems.Add 14, , RS.Fields("KEMBAR")
LV.ListItems(i).ListSubItems.Add 15, , RS.Fields("TELEPHONE")
LV.ListItems(i).ListSubItems.Add 16, , RS.Fields("ADSL")
LV.ListItems(i).ListSubItems.Add 17, , RS.Fields("DATA")
LV.ListItems(i).ListSubItems.Add 18, , RS.Fields("SEGMENT") <<<<<<HERE
LV.ListItems(i).ListSubItems.Add 19, , RS.Fields("KELUASAN")

i try to leave it as comment, it can run.
after a few trials, then the error goes to the next.
the data input include alphabet and number.
example s30, m20.
the data type that i choose in ms access is text.
can i use text if alphabet and number is the input?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kheoyleon is offline Offline
6 posts
since Jul 2009
Aug 4th, 2009
0

Re: run time error "13" type mismatch

horay
my problem solved!
i change the data type and also the data in db
now i can run my program
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kheoyleon is offline Offline
6 posts
since Jul 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Form not maximized
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Database problem!!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC