Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Add a value from Excel to a form in access

Hi, I want to be able to click on a cell in excel, and open access database
form, and automatically insert the value from the excel cell.

I have sussed out opening access and the form, would just like help on
pasting the value from the cell in excel into the form field in access (The
field has focus).

Any sugestions much appreciated.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Add a value from Excel to a form in access

Hi Again,
Did not receive any responses to my post, and have managed to suss it for
myself, so am pretty sure others may find this useful, as its took a while to
sort.
I am not sure whether this is the prettyest way to do this, or whether
theres another easier way, as I am a newbie to VB, but it works, so here goes-

Sub openaccess()

Dim AccessApp As Object
a = ActiveCell.Value
Set AccessApp = CreateObject("Access.Application")
AccessApp.Visible = True
AccessApp.OpenCurrentDatabase "C:\db1.mdb"
AccessApp.UserControl = True

AppActivate "Sheet1"
SendKeys a, True

SendKeys "{ENTER}", True
AccessApp.UserControl = True
End Sub

Still would appreciate some feedback, as Id like to see other ways.

Kevbrad1

"Kevbrad1" wrote:

Hi, I want to be able to click on a cell in excel, and open access database
form, and automatically insert the value from the excel cell.

I have sussed out opening access and the form, would just like help on
pasting the value from the cell in excel into the form field in access (The
field has focus).

Any sugestions much appreciated.

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Form to Excel sheet KevinKBM Excel Discussion (Misc queries) 1 August 3rd 07 09:02 AM
Access form in Excel Autonumber Mald Excel Discussion (Misc queries) 0 August 24th 06 02:09 PM
Create form in Access, use as frontend for Excel bv111 Excel Discussion (Misc queries) 0 June 28th 06 10:27 PM
Access Form In An Access Report (SubForm) Question Gary Links and Linking in Excel 0 January 27th 06 05:54 AM
get access form in excel Laurent M Excel Discussion (Misc queries) 1 January 27th 05 12:30 PM


All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"