Re: Excel to Access



Air code but give this a try.

Dim cnn1 As ADODB.Connection
Dim strCnn1 As String
Dim rs1 As ADODB.Recordset
strCnn1 = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=D:\DATA\Access\Client.mdb;" _
& "Mode=ReadWrite;Persist Security Info=False"
Dim strSQL1 As String
Set cnn1 = New ADODB.Connection
Set rs1 = New ADODB.Recordset
strSQL1 = "SELECT * FROM Accounts;"
cnn1.Open (strCnn1)
rs1.Open strSQL1, cnn1, adOpenDynamic, adLockOptimistic
If rs1.EOF = True Then
rs1.AddNew
rs1!Considerations = Sheets("sheet1").Range("A1")
Else
rs1!Considerations = Sheets("sheet1").Range("A1")
End If
rs1.Update
rs1.Close
cnn1.Close


--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

<michaelburkett@xxxxxxxxx> wrote:
| Is there a way to write data from a cell in Excel to a particular table
|
| AND record within Access?
|
|
| For example we have a database called Client.mdb and a table called
| Accounts and a field in the table called Considerations. Each record
| has information in the Consideration field. The current information is
| pulled into Excel through a simple query. I am trying to avoid going
| back and forth b/w the 2 programs. Any help would be appreciated!
|
|
| Michael Burkett
|


.