Link to home
Start Free TrialLog in
Avatar of chapie
chapie

asked on

parameter queries using VBA

I am trying to delete a set of records from a table using the following VBA, but it tells me to "specify the table containing the records I want to delete"...this also happens when I try to execute a normal query (without using VBA)

doCmd.RunSQL ("DELETE tblGrpDetails.dtlIDx, tblGrpDetails.dtlGroupLu, tblGrpDetails.dtlJobLu
FROM tblGrpDetails INNER JOIN TablesChosen ON tblGrpDetails.dtlJobLu = TablesChosen.TableName;
ASKER CERTIFIED SOLUTION
Avatar of ozphil
ozphil

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chapie
chapie

ASKER

don't know how that would work, I'll try at the office on Monday.

I don't know if you caught it but my topic/title had nothing to do with the question, that's because I was going to ask another question, but changed and forgot to change the topic.

Anyway, my point is that I fixed not only the origional problem, but because that problem was fixed I solved this problem but not needing to delete a join query, because I pass each record to the parameter query.  If you're interested I'll post the code how I did it, I don't know if you are familiar with using VBA w/ parameter queries, I had a tough couple of days trouble shooting this one.
I wondered about the question title, but concentrated on the actual question.

I have used VBA with parameter queries extensively.

Thanks Chapie