how to take input to our application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prasad joshi
    New Member
    • Aug 2012
    • 30

    how to take input to our application

    hello.......... ..

    i am developing access application

    in that my application should take input database for every operation..

    how to implement this

    the method should be user friendly.....

    i dont want to use inbuilt import database method of access


    for ex:

    i have access application . in that i have written queries and vba which extracts data needed from input database,.....


    after extraction from input database(access table) data is calculted and reports are generated....


    but for every operation input table is different . how can my application access external database table....


    how should i implement this.
    what technique i should use so that my application will be able to use different database table for every time.
    how to design this proble .


    gus please help me i am in urgent need
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    I can't make clear from your question whether your application just reads different tables in the SAME database, or different tables in different database files.

    Is this A)
    Read table1 from Database1
    Read table2 from Database1
    Read table3 from Database1
    Read table4 from Database1


    or is this B)
    Read table1 from Database1
    Read table1 from Database2
    Read table1 from Database3
    Read table1 from Database4


    or C)

    Read TableX from Database1
    Read TableY from Database2
    Read TableX from Database3

    Comment

    • prasad joshi
      New Member
      • Aug 2012
      • 30

      #3
      third case that is c)


      plese help me urgently

      Comment

      • TheSmileyCoder
        Recognized Expert Moderator Top Contributor
        • Dec 2009
        • 2322

        #4
        Of course you just had to choose the most complicated one! :)

        Do you in advance know the location of the database files as well as the table names?

        Or does the user need to be able to select both files and tables "on the fly"? If so we are really approaching trying to build something that the access interface allready has (the import wizard)

        Comment

        • prasad joshi
          New Member
          • Aug 2012
          • 30

          #5
          yes user know location and name...

          please tell me

          Comment

          • TheSmileyCoder
            Recognized Expert Moderator Top Contributor
            • Dec 2009
            • 2322

            #6
            I would use VBA to ask the user for the database path (Use a filedialog) and then promt them for the table name.

            You can then (by vba) write a query and execute from VBA, or store the query as a QueryDef and then execute it.

            The syntax would be something like:
            Code:
            SELECT * FROM [Table Name] IN 'C:\TestFolder\testDatabase.mdb' INTO [Temporary Table Name]
            You could as said, parse the query string together using vba and then execute it. I can't really provide you with more details, because you information you have have provided is very vague and general.

            Comment

            • zmbd
              Recognized Expert Moderator Expert
              • Mar 2012
              • 5501

              #7
              Parasad,

              TheSmileyCoder has provided you with a course of action that you can build on to solve the question asked.

              Please make an attempt and post back your code.

              -z

              Comment

              Working...