run time error "13" type mismatch

Reply

Join Date: Jul 2009
Posts: 6
Reputation: kheoyleon is an unknown quantity at this point 
Solved Threads: 0
kheoyleon kheoyleon is offline Offline
Newbie Poster

run time error "13" type mismatch

 
0
  #1
Jul 28th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 471
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 24
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training

Re: run time error "13" type mismatch

 
0
  #2
Jul 29th, 2009
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.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 6
Reputation: kheoyleon is an unknown quantity at this point 
Solved Threads: 0
kheoyleon kheoyleon is offline Offline
Newbie Poster

Re: run time error "13" type mismatch

 
0
  #3
Jul 29th, 2009
did you mean i have to declare every text box that i use to enter data?
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 471
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 24
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training

Re: run time error "13" type mismatch

 
0
  #4
Jul 29th, 2009
not that. you declare it in general declaration. or you use module.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 6
Reputation: kheoyleon is an unknown quantity at this point 
Solved Threads: 0
kheoyleon kheoyleon is offline Offline
Newbie Poster

Re: run time error "13" type mismatch

 
0
  #5
Jul 30th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 471
Reputation: abu taher is an unknown quantity at this point 
Solved Threads: 24
abu taher's Avatar
abu taher abu taher is offline Offline
Posting Pro in Training

Re: run time error "13" type mismatch

 
0
  #6
Jul 30th, 2009
Originally Posted by kheoyleon View Post
why i have to declare?
I just give u a example. paste your code.
I like sword. Attack or Defense.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 6
Reputation: kheoyleon is an unknown quantity at this point 
Solved Threads: 0
kheoyleon kheoyleon is offline Offline
Newbie Poster

Re: run time error "13" type mismatch

 
0
  #7
Jul 30th, 2009
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, 3 views)
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 509
Reputation: selvaganapathy is an unknown quantity at this point 
Solved Threads: 88
selvaganapathy's Avatar
selvaganapathy selvaganapathy is offline Offline
Posting Pro

Re: run time error "13" type mismatch

 
0
  #8
Jul 30th, 2009
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.
KSG
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 6
Reputation: kheoyleon is an unknown quantity at this point 
Solved Threads: 0
kheoyleon kheoyleon is offline Offline
Newbie Poster

Re: run time error "13" type mismatch

 
0
  #9
Aug 1st, 2009
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?
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 6
Reputation: kheoyleon is an unknown quantity at this point 
Solved Threads: 0
kheoyleon kheoyleon is offline Offline
Newbie Poster

Re: run time error "13" type mismatch

 
0
  #10
Aug 4th, 2009
horay
my problem solved!
i change the data type and also the data in db
now i can run my program
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC