473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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
Nov 13 '05 #1
7 3007
are you working on an hotel reservation system?
Nov 13 '05 #2
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" <da*************@uk.easynet.net> wrote in message
news:67**************************@posting.google.c om...
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

Nov 13 '05 #3
"WindAndWaves" <ac****@ngaru.com> wrote in message news:<Pd*****************@news.xtra.co.nz>...
are you working on an hotel reservation system?


Thats right. Any Ideas
Nov 13 '05 #4
"JulieD" <Ju****@hctsReMoVeThIs.net.au> wrote in message news:<uk**************@TK2MSFTNGP10.phx.gbl>...
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" <da*************@uk.easynet.net> wrote in message
news:67**************************@posting.google.c om...
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


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,column,row,hight,width)

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

Darren
Nov 13 '05 #5
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_Name!$A$1,match(B1,StartDate,0),matc h(C1,RoomNumber,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" <da*************@uk.easynet.net> wrote in message
news:67**************************@posting.google.c om...
"JulieD" <Ju****@hctsReMoVeThIs.net.au> wrote in message

news:<uk**************@TK2MSFTNGP10.phx.gbl>...
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" <da*************@uk.easynet.net> wrote in message
news:67**************************@posting.google.c om...
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


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,column,row,hight,width)

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

Darren

Nov 13 '05 #6
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
Nov 13 '05 #7
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
Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Grim Reaper | last post by:
I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for...
1
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am...
5
by: dixie | last post by:
If I sent a user an empty database container - dB with no tables and I needed them to import their tables into it and one of their tables was a hidden table with the prefix Usys, is there any way...
2
by: nutthatch | last post by:
I want to be able to import an Excel spreadsheet into Access 2K using the macro command Transferspreadsheet. However, the file I am importing (over which I have no control) contains some records...
1
by: Geoff Jones | last post by:
Hi I have a question which I hope somebody can answer. I have written a VB application with which I want to import an Excel file, analyze the data within it and do some calculations. There are...
11
by: kaisersose1995 | last post by:
Hi, I've got an import procedure working, using a standard import specification to import a .csv file into a temporary table. The problem i'm having is that i have 4 different sets of borrower...
1
by: winzy | last post by:
I have a table in Access which needs updating from an Excel file. Instead of importing the whole Excel like a new table in Acess, how do I do a partial import/update?? For example, Access table...
5
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All...
3
by: mukeshsrivastav | last post by:
dear sir i want to move form excel to access. i have 5 excel file having same formats and fields.now i want to import all data in one access table. importing one file is easy .but importing and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.