Hi, i have a report that must hide a Header section depending on the value of a field that isn't in the recordsource table of the report.
It must be done several times, therefore the way of doing it must be the one with the lowest resources consumption.
Which one of the two options:
1.- varX = DLookup("[NombreCompañía]", "CompañíasEnvíos", "[IdCompañíaEnvíos] = 1")
2.- strQuery = "SELECT tblName.fieldName....WHERE..."
Set rrdset = New ADODB.recordSet
rrdset.Open strQuery, CurrentProject.Connection, _
adOpenStatic, , adCmdUnknown
varX = rrdset!fieldName
would be the best in that sense? Any other way?
Thanks in advance.
It must be done several times, therefore the way of doing it must be the one with the lowest resources consumption.
Which one of the two options:
1.- varX = DLookup("[NombreCompañía]", "CompañíasEnvíos", "[IdCompañíaEnvíos] = 1")
2.- strQuery = "SELECT tblName.fieldName....WHERE..."
Set rrdset = New ADODB.recordSet
rrdset.Open strQuery, CurrentProject.Connection, _
adOpenStatic, , adCmdUnknown
varX = rrdset!fieldName
would be the best in that sense? Any other way?
Thanks in advance.