473,287 Members | 1,813 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,287 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 3000
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: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.