J
Joel Allen
Outlook 2003 SP3
Hello,
I run select queries from within my code to populate certain fields from a
SQL database. I need to run a "For each" command and am not having luck.
This is what I have so far. For each record it finds, I want it to do
something. Am I going about this wrong?
Set EachRecord = Nothing
Set EachRecord = rst.Open "Select * FROM tblCO WHERE JobNumber = '" &
Item.UserProperties("JobNumber") & "'", _
oADOConn, adOpenKeyset, adCmdTable
For EachRecord
msgbox"hi"
Next
Thanks Joel
Hello,
I run select queries from within my code to populate certain fields from a
SQL database. I need to run a "For each" command and am not having luck.
This is what I have so far. For each record it finds, I want it to do
something. Am I going about this wrong?
Set EachRecord = Nothing
Set EachRecord = rst.Open "Select * FROM tblCO WHERE JobNumber = '" &
Item.UserProperties("JobNumber") & "'", _
oADOConn, adOpenKeyset, adCmdTable
For EachRecord
msgbox"hi"
Next
Thanks Joel