Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Move to Access From Excel- With Option Button????!!!!

Move to Access From Excel- With Option Button????!!!!

Move to Access From Excel- With Option Button????!!!!

I've recieved very much help from this website, thought I would try again.
Here's what I want to do, I have a comprehensive database in Access to keep up with quotes going through the company and their progress.  I'm trying to give an option in Excel from an Option Button on a form to go directly to this database.

I've tried a few things, none work.

Please offer any advice you can!




RE: Move to Access From Excel- With Option Button????!!!!

I just completed something similar.  However, I assigned a macro to a command button and used the following code:

Set db = DBEngine.OpenDatabase("MyDatabase")
Set rs = db.OpenRecordset("MyAccessTable")
rs![Accessfield] = Range("RangeonExcelspreadsheet")
rs![AnotherAccessfield] = Range("AnotherRange")

Hope this helps!

RE: Move to Access From Excel- With Option Button????!!!!

I must be missing something.  I've tried your code above in the code function of a command button on a form in Excel.  When I try to run the command, the first line gives me "Object required".  What did I miss.  I'm thinking that Access must be defined somewhere, what do you think?

Did yours work just as coded above?

I'm new at this coding a little, so you may have to be basic in your explanations.

Thanks so much for your ideas,



RE: Move to Access From Excel- With Option Button????!!!!

Right click on your command button and click on Assign macro.  Click on the macro name that has the code in it and click on Edit.  This will get you back into the code.

From the menu bar, click on Tools-Reference.  A window will pop up with a title bar that says "References-VBA Project".  The following items need to be checked:

Visual Basic for Applications
Microsoft Excel 9.0 Object Library
Micosoft Data Access Components Installed Version

I think the second one in the list above is giving you the object error.  #3 in the list gives you your connection to Access.  I had to go to Microsoft's web site and download the Data Access components (#3).  If you need to do the same, try the following:

1.  Goto www.microsoft.com/data/download.htm
2.  Click on Download mcdc 2.5 sp1 (2.51.5303.5)
3.  Select mdac 2.5 spi (2.51.5303.5) for x86
4.  Click goto Download.
5.  Once the download is complete, execute mdac_typ.exe

My e-mail address is dwuescher@aol.com if you have further questions.  Be sure to reference tek-tips in your subject or I may not read the e-mail.

Hope you can get this to work for you.  Its been a time-saving routine in many of my projects and my clients have been pleased with its functionality.

RE: Move to Access From Excel- With Option Button????!!!!

Thanks for your reply, I'll let you know how it comes out!


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close