How to rename a access table in visual basic

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ciber
    New Member
    • Jul 2013
    • 4

    How to rename a access table in visual basic

    hello ok i need to auto rename a table and for each new time to create date in table name and after that to use query into i am asking if that is possible
    my 1 table name is kalktbl
    and second table name is kalkulacija
    query is
    Code:
    select *
    into kalkulacija
    from kalktbl
    and i am renaming kalkulacija
    can any one help me i am using visual basic

    i will have 6-100 inputs with 6 rows in the same day and when search them user cant see them together in rows he must see them separate just one entrie with that 6 rows because of that i need 6-100 tables (i think) to see them separate and i just want to auto rename them to some date or document number (from field) to find that table. I am open for all sugestions
    Last edited by Rabbit; Jul 21 '13, 11:58 PM. Reason: Please use code tags when posting code or formatted data.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Your thread has been moved to the Access forum.

    Please use code tags when posting code or formatted data.

    You should not create a new table for each date, that would denormalize your data and make querying very difficult. As you can already see since you're having trouble doing so.

    Instead you should just have one table with a date field.

    Comment

    • ciber
      New Member
      • Jul 2013
      • 4

      #3
      Ok but how will i see one input in day if i dont seperate them in a difrent tables and how to auto rename that tables?

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        You see one date by filtering for that date. No need for a bunch of tables.

        Comment

        • zmbd
          Recognized Expert Moderator Expert
          • Mar 2012
          • 5501

          #5
          Database Normalization and Table Structures.

          Comment

          • ciber
            New Member
            • Jul 2013
            • 4

            #6
            ok but if i have 6 inputs with 6 rows in one day he will show all 6 inputs because it is a same date

            Comment

            • zmbd
              Recognized Expert Moderator Expert
              • Mar 2012
              • 5501

              #7
              Build a form on the record set.
              Set the default form view to single.
              The user will only see one record at a time this way.

              I really don't mean to sound mean nor condescending; however, this is really VERY basic database design. In order to really benifit from this site you really need to have a good understanding of the basics.

              You might really benefit from going thru an Access development class, purchasing a few books about this, and finding some online tutorials. Unfortunately my favorite basic tutorial site is down; however, you may find the following helpful:
              Get help with your questions about Microsoft Access with our how-to articles, training videos, and support content.


              I haven’t worked thru the following site; however, it may also be of some help: http://www.freeofficetutorials.com/M...son_1left.html

              Also, go to the insights page (go to the bottom of this page and click on the microsoft Access / VBA Insights Sitemap and read thru the articles 139,138,136,135 ,134,133,132,13 1,130,129,162,1 78,179,142

              You should also read thru:
              Access 2007 reserved words and symbols

              I know it is a lot of reading and information; however, the information here will help us to help you in the long run.

              Once agian, I say this with the upmost respect and kindest intentions - it is the unfourtunate bug with text that you can not see my body-language, nor hear the tone of my voice; however, I assure you of my good intent.

              Comment

              • Rabbit
                Recognized Expert MVP
                • Jan 2007
                • 12517

                #8
                First and foremost I want to second @zmbd's sentiment.

                You said:
                ok but if i have 6 inputs with 6 rows in one day he will show all 6 inputs because it is a same date
                I'm not really sure what you're trying to say there. You don't define what you mean by input. If you just mean that there may be 6 records with the same date but you only want to show one, you can use the TOP predicate in SQL.
                Code:
                SELECT TOP 1 ...
                FROM ...
                WHERE [dateField] = #mm/dd/yyyy#

                Comment

                • ciber
                  New Member
                  • Jul 2013
                  • 4

                  #9
                  no it is a biiling program and i will make 6-100 bills (inputs) with some selling items on it and when i want to see it later i was thinking to make for each bill a difrent table for easy view later on and they will be a difrent seller (users)and that why i need blank table and i just dont know how to sort that data from bills to view them seperated

                  Comment

                  • zmbd
                    Recognized Expert Moderator Expert
                    • Mar 2012
                    • 5501

                    #10
                    Ciber,

                    Once again, that is not the way to do that, nor does it matter what type or purpose you will be using the database for, the route you are taking is simply wrong.

                    Instead, you would build a parameters based query that would pull the information out based upon date, customer account, etc...

                    Please, Please, Please, read thru the information I gave you in Post #7 and in Post #5.

                    Access is not Excel and that is what you trying to use it as... to continue down this path will lead to a nightmare to maintain and use database.

                    Once again I stress that the statements I make are in a sincere, good faith, effort to help you with your project.

                    Comment

                    Working...