sign in | join about | help | sitemap
Connecting Tech Pros Worldwide
farhaaad@gmail.com's Avatar

Excel-Access link


Question posted by: farhaaad@gmail.com (Guest) on March 25th, 2007 12:45 PM
Hi everybody,

I just wanted to know if i can make a form in excel (the same as
access forms), so when i enter data in excel form it goes to a table
in access ? I mean when i enter a value in a cell linked to access
table, it goes to table and when i enter another value in the same
cell the value goes to the next record.

I thank you people in advance!

7 Answers Posted
storrboy's Avatar
Guest - n/a Posts
#2: Re: Excel-Access link


You should just choose which prgram to use. Access will allow you to
do all that within itself and with an easier time accomplishing it. I
don't think using Excel as a front-end is all that efficient.

Larry Linson's Avatar
Guest - n/a Posts
#3: Re: Excel-Access link

<farhaaad@gmail.comwrote
Quote:
Originally Posted by
I just wanted to know if i can make a form in excel (the same as
access forms), so when i enter data in excel form it goes to a table
in access ? I mean when i enter a value in a cell linked to access
table, it goes to table and when i enter another value in the same
cell the value goes to the next record.


In fact, Excel uses MS Forms, which are quite different from Access Forms,
and they are not interchangeable. MS Forms can be used, with a little
hoop-jumping, from Access but Access Forms work better (no surprise) in
Access.

Larry Linson
Microsoft Access MVP


farhaaad@gmail.com's Avatar
farhaaad@gmail.com March 26th, 2007 04:55 AM
Guest - n/a Posts
#4: Re: Excel-Access link

On Mar 25, 11:45 pm, "Larry Linson" <boun...@localhost.notwrote:
Quote:
Originally Posted by
<farha...@gmail.comwrote
>
Quote:
Originally Posted by
I just wanted to know if i can make a form in excel (the same as
access forms), so when i enter data in excel form it goes to a table
in access ? I mean when i enter a value in a cell linked to access
table, it goes to table and when i enter another value in the same
cell the value goes to the next record.

>
In fact, Excel uses MS Forms, which are quite different from Access Forms,
and they are not interchangeable. MS Forms can be used, with a little
hoop-jumping, from Access but Access Forms work better (no surprise) in
Access.
>
Larry Linson
Microsoft Access MVP


Thanks alot, but the proplem with me is that I have data officers who
don't know access at all so i want them to enter data via Excel.

farhaad

The Frog's Avatar
Guest - n/a Posts
#5: Re: Excel-Access link

Hi Farha,

This is something that I have had to play with as well over the last
short while. The only way that I can tell you that works is to create
your forms with the necessary controls in Excel, and handle your
database connections through ADO.

At the moment I am creating a "macro" for excel that has a backend
based in an MDB. For any read operations I use disconnected
recordsets, and only create a write capable connection for the brief
moments when I need to commit data to the database. I also use
transactions for all data updates.

You will have to think carefully about your forms and their design. As
others here have quite rightly posted they are different to Access
forms and are not interchangeable. To help a little in handling data I
generally use some declared (global) variables for anything that is
related from form to form or sub to sub. I also make sure to include
as much error handling code in this as possible because I have found
that Excel does not always play nicely when working with ADO.
Especially make sure to clean up / dispose of your variables with
connection objects and recordsets. I have had afew instances where
Excel simply wont let the user exit, and upon checking the code I find
I have missed cleaning up a variable - I fix it and the problem goes
away.

It can be done, but be warned that it is a slow and painful method to
achieve a goal. If you want to cheat a little you could design you
application in MS Access and simply have an instance of Access created
inside Excel to run what you have made. The user will really only see
the forms that you have created, and as long as you give the user a
clear method to exit the Access application they will return cleanly
to excel. You might want to give the following code a try, it could
get you started...

Private Sub GetAccess()
Dim MyAccess as object
Set MyAccess = CreateObject("Access.Application")
MyAccess.OpenCurrentDatabase "C:\.......enter the path to the db
here"
MyAccess.DoCmd.RunMacro "Name of Macro"
MyAccess.Visible = True
MyAccess.DoCmd.RunCommand 10 'acCmdAppMaximize
MyAccess.DoCmd.RunCommand 11 'acCmdAppMinimize
MyAccess.Quit
Set MyAccess = Nothing
End Sub

I hope this helps :-)

Cheers

The Frog

Keith Wilby's Avatar
Guest - n/a Posts
#6: Re: Excel-Access link

<farhaaad@gmail.comwrote in message
news:1174880949.261723.254490@n76g2000hsh.googlegr oups.com...
Quote:
Originally Posted by
>
Thanks alot, but the proplem with me is that I have data officers who
don't know access at all so i want them to enter data via Excel.
>


Access is a database building tool, not an "application" in the same way as
Excel and Word are. If your users prefer Excel and Excel does the job then
let them use it. If, as I suspect, you have a multi-user requirement then
you could use Access with a form in datasheet mode and make it look just
like Excel. Result - everyone's happy.

HTH - Keith.
www.keithwilby.com


farhaaad@gmail.com's Avatar
farhaaad@gmail.com March 27th, 2007 06:25 AM
Guest - n/a Posts
#7: Re: Excel-Access link

On Mar 26, 12:06 pm, "The Frog" <andrew.hogend...@eu.effem.comwrote:
Quote:
Originally Posted by
Hi Farha,
>
This is something that I have had to play with as well over the last
short while. The only way that I can tell you that works is to create
your forms with the necessary controls in Excel, and handle your
database connections through ADO.
>
At the moment I am creating a "macro" for excel that has a backend
based in an MDB. For any read operations I use disconnected
recordsets, and only create a write capable connection for the brief
moments when I need to commit data to the database. I also use
transactions for all data updates.
>
You will have to think carefully about your forms and their design. As
others here have quite rightly posted they are different to Access
forms and are not interchangeable. To help a little in handling data I
generally use some declared (global) variables for anything that is
related from form to form or sub to sub. I also make sure to include
as much error handling code in this as possible because I have found
that Excel does not always play nicely when working with ADO.
Especially make sure to clean up / dispose of your variables with
connection objects and recordsets. I have had afew instances where
Excel simply wont let the user exit, and upon checking the code I find
I have missed cleaning up a variable - I fix it and the problem goes
away.
>
It can be done, but be warned that it is a slow and painful method to
achieve a goal. If you want to cheat a little you could design you
application in MS Access and simply have an instance of Access created
inside Excel to run what you have made. The user will really only see
the forms that you have created, and as long as you give the user a
clear method to exit the Access application they will return cleanly
to excel. You might want to give the following code a try, it could
get you started...
>
Private Sub GetAccess()
Dim MyAccess as object
Set MyAccess = CreateObject("Access.Application")
MyAccess.OpenCurrentDatabase "C:\.......enter the path to the db
here"
MyAccess.DoCmd.RunMacro "Name of Macro"
MyAccess.Visible = True
MyAccess.DoCmd.RunCommand 10 'acCmdAppMaximize
MyAccess.DoCmd.RunCommand 11 'acCmdAppMinimize
MyAccess.Quit
Set MyAccess = Nothing
End Sub
>
I hope this helps :-)
>
Cheers
>
The Frog


Thank you very much for you kind information, i m working on it and i
m looking for a positive result,

The Frog's Avatar
Guest - n/a Posts
#8: Re: Excel-Access link

No worries :-)

If you get stuck, I will help where I can.

Cheers

The Frog

 
Not the answer you were looking for? Post your question . . .
197,001 members ready to help you find a solution.
Join Bytes.com

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 197,001 network members.
Post your question now . . .
It's fast and it's free

Popular Articles

Top Community Contributors