DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 4 of 4 FirstFirst ... 234
Results 46 to 52 of 52

Thread: Convert Access database to VB project

  1. #46
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    I'm sorry but I can't understand your structure sequence ...
    when findcr() return an error the msgbox() popup then what ? what u do ? and what make errors ? r they run-time errors ? where exactly ? u may make "on error resume next" or "on error resume goto err_handler" for example to catch the error at it's location ... or try debug mode to know where the error occure exactly .

    it's better to post the location that contains error exactly and the error msg .
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  2. #47
    Join Date
    Dec 2006
    Posts
    49
    I don't need to handle error. if its giving an error that mean there is no file named the program returns and its actually not an error of the program, it can only happen if you give some arbit inputs for which there will be no such file present in the data folder.
    In that case i just want to display a msg to the use that "hallo, why are you tryin arbit numbers? " :P and then again let them input proper numbers.
    Can you tell me how to handle this situation.

  3. #48
    Join Date
    Dec 2006
    Posts
    49
    Well i forgot to mention the location of error:

    Error occurs when i try to open the file

    open Fname for input as #1

    becoz no such file is present in the location.

  4. #49
    Join Date
    Aug 2004
    Location
    Orange, California
    Posts
    1,263
    Use the Dir() function to see if the file exists. Like so:

    Code:
    Fname=App.Path & "\Data\Gh" & Cstr(Gh) & "_" & "Cp" & Cstr(Cp)
    If Dir(FName)="" Then
      MsgBox .....
    End If

  5. #50
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819
    It's a runtime error right ?
    u can for example put this statment on the top of your procedure :

    On Error Resume Next

    this method will work but it's not the better method to catch such an error ..

    generally there r better methods to check for the existance of the file like dir() function .
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

  6. #51
    Join Date
    Dec 2006
    Posts
    49
    Hello
    Thank you all for your support and help on my project. I have finished my project (described on the thread "getting data from excel sheet" ).

    Now a problem i am facing is when i converted the project to .EXE is perfectly runs in my computer but it says some thing like:
    "One component is missing, MSMASK32.OCX is required to run the program"

    Please tell me what extra files I should attach with my program and how to attach it so that it works on every computer.


    Sorry if this is not a related thread but i could not find one so i am trying this on. please help me. I have made all the coding etc and now if it doesn't run in the peoples computer then my all effort is use less.

    Thanks
    bye
    TAVA

  7. #52
    Join Date
    Jan 2007
    Posts
    18
    Quote Originally Posted by tava.amitava
    Hello
    Thank you all for your support and help on my project. I have finished my project (described on the thread "getting data from excel sheet" ).

    Now a problem i am facing is when i converted the project to .EXE is perfectly runs in my computer but it says some thing like:
    "One component is missing, MSMASK32.OCX is required to run the program"

    Please tell me what extra files I should attach with my program and how to attach it so that it works on every computer.


    Sorry if this is not a related thread but i could not find one so i am trying this on. please help me. I have made all the coding etc and now if it doesn't run in the peoples computer then my all effort is use less.

    Thanks
    bye
    TAVA
    a bit off topic...
    but, to make the application work you have to copy the file 'MSMASK32.OCX' which is probably on your development workstation to the computer you are trying to run the application on and register it.

    To register the DLL/OCX you need to double click on it, and when windows asks you how to open the file, browse to c:\windows\system32\regsvr32.exe and make this the handler for OCX files (select to open the OCX with this program) which will then register the file for you and allow the program to work.

    A better solution would be to package and register the file automatically in the installer, I think the package and deployment wizard will do this for you aswell as clickonce, or get a third party deployment utility, i used createinstall free when I was developing in VB6.

    Hope this helps
    -Dan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center