LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
mm mm is offline
external usenet poster
 
Posts: 37
Default Copy cell contents to access form

Hi Jason,

thanks for the reply. (I didn't receive any notification but hey ho)

That looks like the kind of thing I'm after. I'm not familiar with QueryDefs
but I'll have a go at it and see what I can achieve.

Thanks, Marcel
"jasontferrell" wrote:

When your line for the transferspreadsheet says "ActiveCell", it's
referring to the active cell of the spreadsheet that's currently
open. This parameter of the TransferSpreadsheet method is looking for
the range that you'd like to import from the Excel file ("A1:B100" or
something like that). The way it's written, it's like you're trying
to move the data from the Excel file into a table in Access called
"Search".

Reading what you actually want to accomplish, it sounds like you might
need to dynamically change the parameters of a query, then display the
result in Access.
Without fully testing, that might look something like this:
With appAcc
.Visible = False
.OpenCurrentDatabase "C:\Documents and Settings\User\My
Documents\Works in progress\database stuff\Copy of job list.mdb"
.CurrentDb.QueryDefs("SearchQuery").Sql = "select * from
SearchTable where Job='" & ActiveCell.Value & "'"
.DoCmd.RunMacro "Search"
.Visible = True
End With

 
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
Display contents of a cell in a user form text box -- Excel 2003 VBA hiskilini Excel Discussion (Misc queries) 7 April 4th 23 10:22 AM
Copy Contents from Cell Stonewall Excel Programming 7 September 23rd 08 04:58 PM
copy cells contents to access form MM Excel Programming 0 January 30th 08 10:28 AM
how to access or copy excel form controls (eg. dropdownlist) values to a database Achu Excel Programming 0 May 30th 07 12:44 AM
From excel - open word doc and copy form field contents to excel c gnome88 Excel Programming 0 July 25th 05 11:45 PM


All times are GMT +1. The time now is 07:59 AM.

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

About Us

"It's about Microsoft Excel"