G
Guest
Option Compare Database
Option Explicit
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "Select * from HSIRouterImport", CurrentProject.Connection,
adOpenKeyset, adLockOptimistic
I can't compile the above code. I have Active X Data Objects 2.1 checked in
the reference libraries. Why does it think it is an outside procedure?
What I'm trying to do is convert a VBA for Excel script to an Access script
so I'm trying to open the table first then remove all the spaces from the
data column. I imported an Excel sheet to Access and I need to scrub the
data in Access instead of Excel. Should I change the sheet objects to
AcTable objects?
This is my excel code:
Sub cleanTextInColumn()
Dim C As Range
On Error Resume Next
With ActiveWorkbook
Set C = Worksheets("Port History").Columns("L")
c.Replace What:=" " Replacement:="" SearchOrder:=xlByColumns
On Error GoTo 0
End With
End Sub
tia,
Option Explicit
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.Open "Select * from HSIRouterImport", CurrentProject.Connection,
adOpenKeyset, adLockOptimistic
I can't compile the above code. I have Active X Data Objects 2.1 checked in
the reference libraries. Why does it think it is an outside procedure?
What I'm trying to do is convert a VBA for Excel script to an Access script
so I'm trying to open the table first then remove all the spaces from the
data column. I imported an Excel sheet to Access and I need to scrub the
data in Access instead of Excel. Should I change the sheet objects to
AcTable objects?
This is my excel code:
Sub cleanTextInColumn()
Dim C As Range
On Error Resume Next
With ActiveWorkbook
Set C = Worksheets("Port History").Columns("L")
c.Replace What:=" " Replacement:="" SearchOrder:=xlByColumns
On Error GoTo 0
End With
End Sub
tia,