i'm trying to use this shapy statement in my vb6 program which uses access, i don't know if i'm doing it right but when i try to execute the recordset with this shape statement it seems like it doesn't know what a shape statement is. it keeps telling me that a sql statemtn should start with select, delete, update.

how do i use a shape statement in vb with access, and how do i pass a parameter to the parent from a text box

here is my shape statement and the code i have

myShape = " SHAPE {select * from tblCustomer where intTicketNum=?} AS cmdJobs APPEND (( SHAPE {select * from tblVisit order by intVisitNum Desc} AS cmdJobVisit APPEND ({SELECT * FROM `tblJobOrder`} AS cmdJobOrder RELATE 'visitID' TO 'visitID') AS cmdJobOrder) AS cmdJobVisit RELATE 'intTicketNum' TO 'intTicketNumb') AS cmdJobVisit"

With myCmd
.CommandText = myShape
.Parameters.Append .CreateParameter("o", adVarChar, adParamInput, 10, txtTicketNum.Text)
.CommandType = adCmdText

Set .ActiveConnection = connShape
Set rs = .Execute
End With