Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default rs.addnew - named range vs. individual cell

Hi Everyone,

I know I can write the codes as follows to transfer data from Excel to
Access...

..AddNew
!FirstName = strFirst
!LastName = strLast
.Update

but is there anyway to specify and entire named range and have that append
into the access table without specifying each individual field? I've made my
excel record include all fields the same as the access record.

~Jessica
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default rs.addnew - named range vs. individual cell

"Jessica" wrote in message
...
Hi Everyone,

I know I can write the codes as follows to transfer data from Excel to
Access...

.AddNew
!FirstName = strFirst
!LastName = strLast
.Update

but is there anyway to specify and entire named range and have that append
into the access table without specifying each individual field? I've made
my
excel record include all fields the same as the access record.

~Jessica


Hi Jessica,

You can probably do something like this...

rs.AddNew
For i = 1 To rs.Fields.Count
rs(i - 1) = Range("whatever").Cells(1, i)
Next
rs.Update

Roger


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
value of one cell in a named range Karen53 Excel Programming 3 September 15th 07 08:45 PM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Individual cell selection in a range Riddler Excel Discussion (Misc queries) 3 December 8th 06 10:26 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
If any cell in named range = 8 then shade named range JJ[_8_] Excel Programming 3 August 26th 05 11:09 PM


All times are GMT +1. The time now is 09:45 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"