importing Data from access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Darren

    #1

    importing Data from access

    I have been attempting to create a reservation planning form in excel
    that imports Data from an Access database and inserts that information
    automaticly into the correct spreed sheet and the correct cells within
    that worksheet. The Excel Book is made up of 12 worksheets named
    Jan-Dec. Each worksheet has columns labeled as each day of that month.
    Column 'A' is reserved for 19 rows named "room1 - room19". The data I
    am importing from the data base is " start date", "end date" and "room
    number". I am also importing " surname" which i have intended to use
    as the data that is actually inserted into the cell which is hopefull
    pinpointed using the other information. I have had an attempt at using
    VBA but totally unsuccessful. I am hoping that someone could point me
    in the right direction. Please
  • WindAndWaves

    #2
    Re: importing Data from access

    are you working on an hotel reservation system?


    Comment

    • JulieD

      #3
      Re: importing Data from access

      Hi Darren

      i've just done something very similar (with heaps of help from this & other
      ngs) the way i approached it was
      1) use a make-table query in access to extract the data that i want to use
      in excel to one table
      2) open excel and use data / get external data / database query
      to return all the data from the table into one sheet (called imported from
      access)
      3) then linked the fields in the other sheets to the correct fields in this
      sheet (using a combination of offset / match & lookup functions - depending
      on how "variable" the data is)
      4) wrote code to prompt to refresh the data when the workbook is opened -
      when the data is refreshed it saves the workbook with a new name & unlinks
      the query from access

      this might give you a plan of attack -

      Cheers
      JulieD


      "Darren" <darren.faulkne r@uk.easynet.ne t> wrote in message
      news:670c7e48.0 406170432.7db8d 437@posting.goo gle.com...[color=blue]
      > I have been attempting to create a reservation planning form in excel
      > that imports Data from an Access database and inserts that information
      > automaticly into the correct spreed sheet and the correct cells within
      > that worksheet. The Excel Book is made up of 12 worksheets named
      > Jan-Dec. Each worksheet has columns labeled as each day of that month.
      > Column 'A' is reserved for 19 rows named "room1 - room19". The data I
      > am importing from the data base is " start date", "end date" and "room
      > number". I am also importing " surname" which i have intended to use
      > as the data that is actually inserted into the cell which is hopefull
      > pinpointed using the other information. I have had an attempt at using
      > VBA but totally unsuccessful. I am hoping that someone could point me
      > in the right direction. Please[/color]


      Comment

      • Darren

        #4
        Re: importing Data from access

        "WindAndWav es" <access@ngaru.c om> wrote in message news:<PdgAc.580 $LT3.24942@news .xtra.co.nz>...[color=blue]
        > are you working on an hotel reservation system?[/color]

        Thats right. Any Ideas

        Comment

        • Darren

          #5
          Re: importing Data from access

          "JulieD" <JulieD@hctsReM oVeThIs.net.au> wrote in message news:<ukvpXgGVE HA.3592@TK2MSFT NGP10.phx.gbl>. ..[color=blue]
          > Hi Darren
          >
          > i've just done something very similar (with heaps of help from this & other
          > ngs) the way i approached it was
          > 1) use a make-table query in access to extract the data that i want to use
          > in excel to one table
          > 2) open excel and use data / get external data / database query
          > to return all the data from the table into one sheet (called imported from
          > access)
          > 3) then linked the fields in the other sheets to the correct fields in this
          > sheet (using a combination of offset / match & lookup functions - depending
          > on how "variable" the data is)
          > 4) wrote code to prompt to refresh the data when the workbook is opened -
          > when the data is refreshed it saves the workbook with a new name & unlinks
          > the query from access
          >
          > this might give you a plan of attack -
          >
          > Cheers
          > JulieD
          >
          >
          > "Darren" <darren.faulkne r@uk.easynet.ne t> wrote in message
          > news:670c7e48.0 406170432.7db8d 437@posting.goo gle.com...[color=green]
          > > I have been attempting to create a reservation planning form in excel
          > > that imports Data from an Access database and inserts that information
          > > automaticly into the correct spreed sheet and the correct cells within
          > > that worksheet. The Excel Book is made up of 12 worksheets named
          > > Jan-Dec. Each worksheet has columns labeled as each day of that month.
          > > Column 'A' is reserved for 19 rows named "room1 - room19". The data I
          > > am importing from the data base is " start date", "end date" and "room
          > > number". I am also importing " surname" which i have intended to use
          > > as the data that is actually inserted into the cell which is hopefull
          > > pinpointed using the other information. I have had an attempt at using
          > > VBA but totally unsuccessful. I am hoping that someone could point me
          > > in the right direction. Please[/color][/color]

          Hi Julie
          Thanks for the info. I have got as far as importing the data to a new
          worksheet but I am now having problems linking the Data with my
          original form ( basicly haven,t got a clue as to how this is done). i
          assume that some of the data imported i.e (start date , end date and
          room number) will somehow need to go into the offset formula to locate
          the cell the data needs to go into. Would I be correct to say that
          the formula should be similar to this:

          offset (A1, startdate, room number, 1 , total number of days)
          OFFSET (reference,colu mn,row,hight,wi dth)

          I can see a little light at the end of the tunnel.

          Darren

          Comment

          • JulieD

            #6
            Re: importing Data from access

            Hi Darren

            glad you're getting somewhere with it .. .you don't need to use all the
            parameters of the offset function - the last two are optional and, in this
            case, i think, irrelevant for you.

            =offset(Sheet_N ame!$A$1,match( B1,StartDate,0) ,match(C1,RoomN umber,0))

            where startdate and roomnumber are the names of the ranges (startdate the
            rows & roomnumber the columns) where the start dates (B1) & room numbers
            (C1) are held - so you're asking excel to go to the imported sheet, find the
            appropriate start date and move across to the relevant room number and
            return the information at the junction of these two bits of information.

            hope this helps
            Cheers
            JulieD




            "Darren" <darren.faulkne r@uk.easynet.ne t> wrote in message
            news:670c7e48.0 406210704.32838 ea7@posting.goo gle.com...[color=blue]
            > "JulieD" <JulieD@hctsReM oVeThIs.net.au> wrote in message[/color]
            news:<ukvpXgGVE HA.3592@TK2MSFT NGP10.phx.gbl>. ..[color=blue][color=green]
            > > Hi Darren
            > >
            > > i've just done something very similar (with heaps of help from this &[/color][/color]
            other[color=blue][color=green]
            > > ngs) the way i approached it was
            > > 1) use a make-table query in access to extract the data that i want to[/color][/color]
            use[color=blue][color=green]
            > > in excel to one table
            > > 2) open excel and use data / get external data / database query
            > > to return all the data from the table into one sheet (called imported[/color][/color]
            from[color=blue][color=green]
            > > access)
            > > 3) then linked the fields in the other sheets to the correct fields in[/color][/color]
            this[color=blue][color=green]
            > > sheet (using a combination of offset / match & lookup functions -[/color][/color]
            depending[color=blue][color=green]
            > > on how "variable" the data is)
            > > 4) wrote code to prompt to refresh the data when the workbook is[/color][/color]
            opened -[color=blue][color=green]
            > > when the data is refreshed it saves the workbook with a new name &[/color][/color]
            unlinks[color=blue][color=green]
            > > the query from access
            > >
            > > this might give you a plan of attack -
            > >
            > > Cheers
            > > JulieD
            > >
            > >
            > > "Darren" <darren.faulkne r@uk.easynet.ne t> wrote in message
            > > news:670c7e48.0 406170432.7db8d 437@posting.goo gle.com...[color=darkred]
            > > > I have been attempting to create a reservation planning form in excel
            > > > that imports Data from an Access database and inserts that information
            > > > automaticly into the correct spreed sheet and the correct cells within
            > > > that worksheet. The Excel Book is made up of 12 worksheets named
            > > > Jan-Dec. Each worksheet has columns labeled as each day of that month.
            > > > Column 'A' is reserved for 19 rows named "room1 - room19". The data I
            > > > am importing from the data base is " start date", "end date" and "room
            > > > number". I am also importing " surname" which i have intended to use
            > > > as the data that is actually inserted into the cell which is hopefull
            > > > pinpointed using the other information. I have had an attempt at using
            > > > VBA but totally unsuccessful. I am hoping that someone could point me
            > > > in the right direction. Please[/color][/color]
            >
            > Hi Julie
            > Thanks for the info. I have got as far as importing the data to a new
            > worksheet but I am now having problems linking the Data with my
            > original form ( basicly haven,t got a clue as to how this is done). i
            > assume that some of the data imported i.e (start date , end date and
            > room number) will somehow need to go into the offset formula to locate
            > the cell the data needs to go into. Would I be correct to say that
            > the formula should be similar to this:
            >
            > offset (A1, startdate, room number, 1 , total number of days)
            > OFFSET (reference,colu mn,row,hight,wi dth)
            >
            > I can see a little light at the end of the tunnel.
            >
            > Darren[/color]


            Comment

            • WindAndWaves

              #7
              Re: importing Data from access

              Dear Darren

              I have written a large reservation system myself. If you would be keen to
              share any ideas then do not hesitate to contact me.

              Anyway, I am not a specialist for your question, but I would make an excel
              file and link it to Access, rather than the other way round.

              Having said that, why would you use Excel at all?

              Let me know

              - Nicolaas


              Comment

              • Darren

                #8
                Re: importing Data from access

                Hi Julie

                I have been attempting as suggested to use OFFSET and MATCH functions
                to a certain degree of success. I have also used the ADDRESS function.
                These have both located the cell or cells successfully. The OFFSET
                function just tells me that no value is inserted in the located cell
                and ADDRESS returns the cell reference. Any Idea how I can force a
                particular value to the located cell or cells.

                Thanks

                Darren

                Comment

                Working...