how to attach variable to fllowing command

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?
 
D

Dorian

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".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top