Hi all,
I´m having a problem with passing a bound value ´value1´ from a subReport ´subRep1´ into a SQL statement.
Find my code below.......
==========================================
Dim varRecords As Variant
Dim dbs As Database
Dim recSet As DAO.Recordset
Dim strQuerySQL As String
Dim inVar As Int
Set dbs = CurrentDb
inVar = [Reports]![Rep1]![subRep1].[Report]![value1]
strQuerySQL = "SELECT * FROM Table1"
strQuerySQL = strQuerySQL & "WHERE (Table1.DRLID) = inVar"
strQuerySQL = strQuerySQL & "ORDER BY Table1.DRLID;"
Set recSet = dbs.OpenRecordset(strQuerySQL, dbOpenDynaset)
recSet.FindFirst inVar
=====================================
The field inVar gets populated correctly, but therefore the recSet RecordSet doesn´t work.
Also, is the syntax for the line....
recSet.FinFirst invar ......correct?
Your probably saying why not use the Sekk method, but it doesn´t seem to work with linked tables!!
Thankyou, for you help