Importing Excel into an Access Form

S

sunsolar1

I have a fairly large Excel file I need to import into an Access Form. The
columns align with the exception of the first. How can this be done?
 
K

Klatuu

You don't import anything into a form. Only tables contain data. Forms are
a tool to view and manipulate data in tables.

If you want to veiw the data in an Excel spreadsheet in an Access form, you
can use the TransferSpreadsheet method to link to the spreadsheet. Then you
can use the linked sheet as the record source for a form, but be aware, you
will not be able to make any changes to it. Linked Excel spreadsheets are
read only because of a lawsuit Microsoft lost a couple of years ago.

If you need to update the data and make it available in the spreadsheet, the
easiest way would be to import the spreadsheet into a table, do the
manipulation in your form, then export the table to Excel.
 
K

Klatuu

No, there is not. To repeat. Only tables contain data.

If you will describe what it is you want to do, maybe I can help with how to
do it.
 
I

Isis

Why cant the OP simply have an 'Import' button on the form that reads the
XL sheets row data and assigns it to each of the Forms Fields ?

I admit, I am not an experienced VB programmer but I do this all the time
in other languages.

HTH
 
I

Isis

bhicks11 said:
Hi Isis,

You can do this will a little VBA programming (or macro). Place your
button on the form that runs the following code or macro (onclick
<Snip>

Hi bhicks11,

I was not the OP, it wasn't my problem. I was just saying that the reply
that stated that it could not be done (sounded like it could NOT be done)
was not really true, just takes a little effort to implement.

My preferred option would be a button as you say, read in one records
worth of data (selected using some criteria) and then assign the data to
each field on the form as required, possible having done some validation
inbetween. There are loads of resources on the net for how to do the
import in VBA, even easier in some ways with a CSV or TXT file.

Please understand, I am not rubishing anyones replies, just saying that
this can be done, and actually quite easily even though Access may not do
it by default :)

The OP sounded like he really needed to achieve it and it is achevable.

Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top