FryGirl
Well-known Member
- Joined
- Nov 11, 2008
- Messages
- 1,368
- Office Version
- 365
- 2016
- Platform
- Windows
I found a workbook which runs an ADODB connection just fine. I'm now rebuilding a workbook to my specs, but the same code which runs on the first workbook will not run on the second.
I get the error, "No value given for one or more required parameters" and it debugs on
I've checked the tools - references in the VBE and seem to have what is needed. Doing some online research, it said I should have Microsoft ActiveX Data Objects 6.1 and that is checked.
The table is as below. Starts on A4 with the header and column B is just set to a large number.
I get the error, "No value given for one or more required parameters" and it debugs on
VBA Code:
Dim sSQL As String
VBA Code:
Set RecSt3 = New ADODB.Recordset
sSQL = "SELECT * FROM [A4:B100] where (MemberName is not null and (MemberName=ReportTo));"
RecSt3.Open sSQL, ExcConn, adOpenKeyset
I've checked the tools - references in the VBE and seem to have what is needed. Doing some online research, it said I should have Microsoft ActiveX Data Objects 6.1 and that is checked.
The table is as below. Starts on A4 with the header and column B is just set to a large number.
MemberName | ReportTo |
CC | CC |
CCF | CC |
CCQ | CC |
FSC | CC |
FSCA | FSCA |
FSCN | FSCA |
FSD | CC |
FSDA | FSDA |
FSDE | FSDA |
FSDL | FSDA |
FSDP | FSDA |