Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All, I am having an issue with my database. I connected my excel form to access database using DAO which is not populating the access database. Here is my code to connect to the access database. Dim db As Database, rs As Recordset, r As Long Set db = OpenDatabase("C:\Documents and Settings\My Documents\DemoDB") Set rs = db.OpenRecordset("Demo_Table", dbOpenTable) r = 3 Do While Len(Range("A" & r).Formula) 0 With rs .AddNew .Fields("Officer Name") = Range("A" & r).Value .Fields("Officer Phone #") = Range("D" & r).Value .Fields("Contact Person Name") = Range("E" & r).Value .Fields("Contact Person Phone #") = Range("F" & r).Value .Fields("Address") = Range("K" & r).Value .Fields("City") = Range("L" & r).Value .Fields("State") = Range("M" & r).Value .Fields("Zip Code") = Range("N" & r).Value .Fields("Special Instructions/Comments") = Range("P" & r).Value .Update End With r = r + 1 Loop rs.Close Set rs = Nothing db.Close Set db = Nothing This is my code to connect to the access database, Its not displaying any error. Once I click "Submit" button on excel user form it just does nothing. It does populate in excel sheet that I have, But not the Access database. PLEASE HELP. Thanks in Advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel form populating in access 2002-03 but not 2007 | Excel Programming | |||
connect excel user form to access database | Excel Programming | |||
auto populate access database from an excel form | Excel Programming | |||
Excel template as form for data entry in Access database | Excel Discussion (Misc queries) | |||
Error while populating a combobox from Access database | Excel Programming |