-
Can anyone tell me what is wrong here.
Code:
Dim rs As ADODB.Recordset
Dim sSQL As String
sSQL = "SELECT FeedGrowth.Batch, FeedGrowth.[Current Hd], FeedGrowth.CurrentLbs, FeedGrowth.Size From FeedGrowth " & _
"WHERE (((FeedGrowth.Batch) Like ('*" & lblPondFrom.Caption & "*'))) " & _
"ORDER BY FeedGrowth.Size DESC"
Set rs = GetRecordSet(sSQL)
Set hfgPondFrom.DataSource = rs
My grid doesn't load.
-
Change those asterisks (*) to percent (%) and you should be good to go. You've just encountered one of the problems with using MS Access to prototype your SQL statements. The asterisks might have worked in DAO, but ADO wants them to be percent signs.
Gerald
-
You da man Gerald! thanks