ADO I Finally Got IT Hurray!! But Now...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am getting an error No value given for one or more required parameters
If I replace the managerID with a number code works. I have tried putting a
textbox
on userform to hold the value of Column(2) on cboStoreIP Change event but
that dosen't work

Any help would be great

Thanks Mike

managerID = Me!cboStoreIP.Column(2)
"IIf([EMPLOYEE_ID]=managerID,[Expr9],0) AS Expr10, IIf([EMPLOYEE_ID]
<>managerID,[Expr9],0) AS Expr11 "
 
I am getting an error No value given for one or more required parameters
If I replace the managerID with a number code works. I have tried putting a
textbox
on userform to hold the value of Column(2) on cboStoreIP Change event but
that dosen't work

Any help would be great

Thanks Mike

managerID = Me!cboStoreIP.Column(2)
"IIf([EMPLOYEE_ID]=managerID,[Expr9],0) AS Expr10, IIf([EMPLOYEE_ID]
<>managerID,[Expr9],0) AS Expr11 "

Since we have no way to know what datatype any of these fields might be, what
the RowSource of the combo is, what's in Column(2) - the third column since
it's zero based - or the context of this code, I don't see how we could
possibly help you.

You can see your database. We can't. Give us some help here please?

John W. Vinson [MVP]
 
What you have posted is not code (or, at least, not code that compiles).
The first line looks to be a syntactically valid VBA statement, but the
second line is nothing but a string literal.

*IF* the second line is supposed to be a snippet from a query, you cannot
reference a VBA variable (managerID). Possibly you should be referring to
Eval(Forms!frmSomeForm!cboStoreIP.Column(2)) instead of managerID. Or, if
you are constructing a query in VBA code:

"IIf([EMPLOYEE_ID]=" & managerID & ",[Expr9],0) AS Expr10,
IIf([EMPLOYEE_ID]<>" & managerID & ",[Expr9],0) AS Expr11 "
 
Incidentally, unless you are planning to build an ADP, you are wasting your
time with ADO. As of Access 2007, DAO is once again the latest, greatest
thing (for a week or two, until MS has another change of heart!)
 
Back
Top