Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default HELP PLEASE: Populate multiple excel rows in access at the same ti

Hi All,

How can I make multiple data for the same column in excel go in access.

eg: There is a button "Submit" on the excel sheet that exports all of the
student data at once in the database.. I want to insert all this data in a
seperate row.. all at once..

Here is what My excel table looks like:

Student_ID Subjects Grades

123456 Eng A
123456 Hist B
123456 Math B+
123456 Bio B-

So, once we click "Submit" I want the the data displayed above to go in
access, Each student data should go in a new row(basically access table
should look exactly the same as the excel sheet above)

here is what I have for recordset(part of my code):

With rs
.AddNew
.Fields("Student_ID") = Range("A3").Value
.Fields("Subject") = Range("B3").Value
.Fields("Grades") = Range("C3").Value

.Update
End With
r = r + 1



Thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default HELP PLEASE: Populate multiple excel rows in access at the same ti

I'm not sure if you're asking for help coding the Submit function, or if it
works fine but you are having trouble with your database table.

If the latter, open your database, right-click on the table name and click
"Design View". Look for the field with the little key symbol next to it.
Right-click on the key symbol and click "Primary Key" to remove the key.
Last, click on the actual field name and look at the properties below. If
you see "Yes (No Duplicates)" click there and select "Yes (Duplicate OK)".
That should allow multiple rows.

"sam" wrote:

Hi All,

How can I make multiple data for the same column in excel go in access.

eg: There is a button "Submit" on the excel sheet that exports all of the
student data at once in the database.. I want to insert all this data in a
seperate row.. all at once..

Here is what My excel table looks like:

Student_ID Subjects Grades

123456 Eng A
123456 Hist B
123456 Math B+
123456 Bio B-

So, once we click "Submit" I want the the data displayed above to go in
access, Each student data should go in a new row(basically access table
should look exactly the same as the excel sheet above)

here is what I have for recordset(part of my code):

With rs
.AddNew
.Fields("Student_ID") = Range("A3").Value
.Fields("Subject") = Range("B3").Value
.Fields("Grades") = Range("C3").Value

.Update
End With
r = r + 1



Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default HELP PLEASE: Populate multiple excel rows in access at the sam

No, My issue is not with the primary key or the database.

I simply want this data to go to access when I click "Submit" button in excel

Student_ID Subjects Grades
123456 Eng A
123456 Hist B
123456 Math B+
123456 Bio B-

So for eg: when I click "Submit" in excel..
I want the whole thing displayed above to go to access.

Thanks in advance

"Charlie" wrote:

I'm not sure if you're asking for help coding the Submit function, or if it
works fine but you are having trouble with your database table.

If the latter, open your database, right-click on the table name and click
"Design View". Look for the field with the little key symbol next to it.
Right-click on the key symbol and click "Primary Key" to remove the key.
Last, click on the actual field name and look at the properties below. If
you see "Yes (No Duplicates)" click there and select "Yes (Duplicate OK)".
That should allow multiple rows.

"sam" wrote:

Hi All,

How can I make multiple data for the same column in excel go in access.

eg: There is a button "Submit" on the excel sheet that exports all of the
student data at once in the database.. I want to insert all this data in a
seperate row.. all at once..

Here is what My excel table looks like:

Student_ID Subjects Grades

123456 Eng A
123456 Hist B
123456 Math B+
123456 Bio B-

So, once we click "Submit" I want the the data displayed above to go in
access, Each student data should go in a new row(basically access table
should look exactly the same as the excel sheet above)

here is what I have for recordset(part of my code):

With rs
.AddNew
.Fields("Student_ID") = Range("A3").Value
.Fields("Subject") = Range("B3").Value
.Fields("Grades") = Range("C3").Value

.Update
End With
r = r + 1



Thanks in advance

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
Exporting multiple rows from access to excel, each in a new row sam Excel Programming 2 October 19th 09 01:56 PM
Delete Rows of Data in multiple Excel Sheets upon importing to Access [email protected] Excel Programming 1 October 27th 08 10:15 PM
how to get Excel 07 combobox to populate from MS Access table? xz Excel Discussion (Misc queries) 0 November 20th 07 05:45 PM
Using Access database to "populate" Excel Sheets maacmaac Excel Discussion (Misc queries) 1 September 19th 05 05:06 PM
How to populate Excel Range from Access RecordSet? deko[_2_] Excel Programming 6 February 27th 05 03:43 PM


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