how to attach variable to fllowing command

  • Thread starter Thread starter ezil
  • Start date Start date
E

ezil

The code is
docmd.openreport "report1",,,"[field1]="'abc'"
orderby="[id]'
is working but i want like this
condtion="[field1]="'abc'"
order ="[id]"

docmd.openreport "report1",,, (variable condition)
orderby=(variable order)

how to put semicolon and & correctly for this?
 
Dim strCommand As String
Dim strVariable As String
strVariable = "[Id]"
strCommand = "command " & strVariable
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Back
Top