Search results

  1. A

    Read a file and import its data into a table

    no matter what i put be it cdbl or clng, it still gives me that error "Type Mismatch". :banghead: The if statement checks for a 0 value and then the else statement is executed, shouldn't the else statement be skipped if the if statement is true, or was it the other way round.
  2. A

    Read a file and import its data into a table

    going nuts with this error Dim BaseFare as Long BaseFare = Mid(TextLine, 9, 10) is how it is. But when the BaseFare gets a value of 0, an error returns with "Type Mismatch". tried the if statement That did not solve it either.
  3. A

    Read a file and import its data into a table

    Still gives an error, "Type mismatch" at EQamt = CLng(Mid(TextLine, 39, 12))My variable is long. The actual field is empty so the value for BaseFare picked up is 0. not sure where the problem is.
  4. A

    Read a file and import its data into a table

    tried that, returned error "Sub or Function not defined"
  5. A

    Read a file and import its data into a table

    Aite will let you know once it is done. One doubt lets say one of variable has no value or is zero, will this return error by any chance.
  6. A

    Read a file and import its data into a table

    ok i've above is solved and all working well. Earlier i had set the Basefare as string and now changed to Long. When running the app i get a "type mismatch" at BaseFare = Trim(Mid(TextLine, 9, 12))and the value in the variable is 0. Is it because long can't take values of 0 or is it something...
  7. A

    Read a file and import its data into a table

    how can i autoscroll the txtMirActivity text box
  8. A

    Read a file and import its data into a table

    ok ! i've managed clear all the errors and everything seems to be working fine now. Inorder to overcome those errors i had to use the goto statements. here is my code so far Open SrcFolder & srcfile For Input As #1 'Open specified file Pax = Empty 'clear variable for next file...
  9. A

    Read a file and import its data into a table

    and when using tkt="" to clear the memory an error returns type mismatch
  10. A

    Read a file and import its data into a table

    now it says overflow at tkt = ALC & Trim(Mid(TextLine, 49, 10))
  11. A

    Read a file and import its data into a table

    tried the above and i get an error "Data type converstion error" RSTkt![TicketNumber] = tkton the db the data type is Long Integer and in vba tkt is decalerd as Long. Don't what this is error is related to ? The tkt value is null so i guess its something to do with handling null values as for...
  12. A

    Read a file and import its data into a table

    Tried changing the changing the data type of tkt, whihc holds the ticket number to ineger in vba but gives an error "Overflow", So unless that is done can't change data type in the database variable tkt is tkt = ALC & Trim(Mid(TextLine, 49, 10)) so halting on the change. The code for 'goto is...
  13. A

    Read a file and import its data into a table

    Will post the code about the goto statement once i get to my laptop. Will change the data type also.
  14. A

    Read a file and import its data into a table

    Am blessed with a boy, so kinda busy with him. Will post any update on the code latter😊
  15. A

    Read a file and import its data into a table

    Well i was confused at to why your code was wrong. The ticket number is actually only numbers. But in the table the data type is shorttext. So i guess maybe thats why all the confusion. For everything seems to be ok. Had to use the goto statement for omitting some steps.
  16. A

    Read a file and import its data into a table

    yes mailman i do, i've figured it out and its working now. the part in red had to be added DCount("TicketNoID", "tblticketNumber", "[TicketNumber]=""" & tkt & """")
  17. A

    Read a file and import its data into a table

    but trying this DCount("TicketNoID", "[tblticketNumber]", "[TicketNumber]='" & tkt)"Syntax error in string in query expression '[TicketNumber]='1234567890123" getting close but not close enough
  18. A

    Read a file and import its data into a table

    Sorry it read "Data type mismatch in criteria expression"
  19. A

    Read a file and import its data into a table

    Compiling it gives no error but running it from the form gives the error.
  20. A

    Read a file and import its data into a table

    Yup tried that, it gave criteria syntax error
Back
Top Bottom