+ Reply to Thread
Results 1 to 8 of 8

Trying to "automate" inserting record numbers in Access 2010 query

  1. #1
    Forum Contributor
    Join Date
    03-22-2012
    Location
    Narragansett, Rhode Island
    MS-Off Ver
    Excel 2007
    Posts
    122

    Trying to "automate" inserting record numbers in Access 2010 query

    Hi

    Very much a newbie in Access 2010. I have successfully created queries involving a 10 or so record numbers in a large database. I now need to create a query made up of 170+ record numbers per year for 15 years. I am wondering if I can, in some way, import the record numbers from Excel to Access? Otherwise, I will have to type or paste the 170+ record numbers for each year.

    Appreciate any suggestions/reading material.tutorials.

    Thank you

    Al

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Trying to "automate" inserting record numbers in Access 2010 query

    Not sure I am understanding what you want to ultimately do, but to answer the question about importing record numbers: Yes, you can import files from Excel to Access. Use the Import Wizard. Make sure that your table that you are importing is set up properly for Access. If you provide more details on what you are specifically doing, then we can probably help you.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    03-22-2012
    Location
    Narragansett, Rhode Island
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Trying to "automate" inserting record numbers in Access 2010 query

    Hi

    Thank you for responding. I am trying to create a query in access 2010. The files that I am working with are very large so itwas recommended that I link to the csv files that I downloaded from the Center for Medicaid Services. I would like to create a query that begins with a record number that pulls a range of data from the Medicare Cost Report. Up till this point, I have entered the record numbers individually followed by other data parameters. My problem is that I want to run a large query so I am wondering if I can use the record numbers that I already have stored in an Excel file. Otherwise, I will have to enter each record number either via cut and past or type them in which will be very time consuming. The out put of this query is a series of data extracted from the various worksheets in the cost report.

    Thanks again for offering to help. Is this answer specific enough. I could, I think, attach an access file if that would help you to assist me.

    Al

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Trying to "automate" inserting record numbers in Access 2010 query

    So you want join the .csv file that you have linked to Access with an excel file that you will import into Access in a query? Is that correct? This is doable. Use the import wizard to accomplish this.

  5. #5
    Forum Contributor
    Join Date
    03-22-2012
    Location
    Narragansett, Rhode Island
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Trying to "automate" inserting record numbers in Access 2010 query

    Hi

    I realize I haven't given you much of a description so I reread the literature for the data base. So let me try again. The data base is comprised of three tables (1) Report Table containing descriptive information (2) Alpha Table containing character and numeric values (3) Numeric Table containing numbers only. The files are in Excel's csv format. This is a relational data base which, according to the literature, means that the Report Table needs to be linked with either the Alpha or Numeric table depending on the values requested. The linking field is known as the report record number RPT_REC_NUM. The individual RPT_REC_NUM represents one line of data for each organization in the data base which contains of the the numeric and descriptive data for that organization for a given year.

    So far, I have been successful in accessing the data base because I have been dealing with a small number or organizations. What I have done is to (1) open a particular year in Access (2) click on Create/Design Query (3) open the Report and Numeric Tables. The first item in each is the RPT_REC_NUM (4) click, drag, connect the RPT_REC_NUM from the Report Table to the Numeric Table. I then type in a record number and a description of the items sought in the query. This is a somewhat time consuming process because I have to retype the record numbers every time (1) I require additional information from the data base and (2) when I make a mistake.

    The problem I am trying to overcome is that I would like to query the data base for information on 170+ organizations which means that I, with my current method, would have to enter the RPT_REC_NUM for 170+ organizations for every year of data that I want to retrieve. I understand that there is an alternative method that links a table of record numbers, RPT_REC_NUM, to the Report Table and the Numeric Table used in an inquiry. Currently, I have the record numbers for each year in an Excel file. I think this may be called creating a MakeTable query?

    So my questions are (1) is it possible to create a table containing record numbers that can be used over and over again and (2) if yes, can I do this through some import function so that I avoid manual processes?

    I hope this description gives you a better idea of what I would like to accomplish.

    Thanks again for responding.

    Al

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,855

    Re: Trying to "automate" inserting record numbers in Access 2010 query

    Al--
    I think I got it. Import your Excel Table of Record Numbers into Access. Create a form and put a combo box on the form. Set the record source for the combo box to the new Record Numbers Table. Use this control (combo box) as your criteria for the query, so that you don't have to type it each time you run the query. Look at these two videos to understand where I am going with this.

    1. Is a video on setting up a combo box for searching for a particular record. You should be able to adapt this to meet your needs after you look at the second video.
    2. Second video shows you how to create a search form. Use this information to create the search form but adapt it with a combo box from the first video.

    Once you get into this and if you encounter any issues, post back with the specifics that are troubling you.

    http://www.datapigtechnologies.com/f...tomfilter.html

    http://www.datapigtechnologies.com/f...earchform.html

    Good Luck with this. Have a 'Gansett. Can you still find them in Rhodie?

  7. #7
    Forum Contributor
    Join Date
    03-22-2012
    Location
    Narragansett, Rhode Island
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Trying to "automate" inserting record numbers in Access 2010 query

    Thank you.

    Looks like I have my work cut out for me today!

    Al

  8. #8
    Forum Contributor
    Join Date
    03-22-2012
    Location
    Narragansett, Rhode Island
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Trying to "automate" inserting record numbers in Access 2010 query

    Just a note to say that your help pointed me in the right direction, helping me to think through and SOLVE my problem.

    Very helpful contribution

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1