Well, in VB this works:
db.Execute ("DELETE FROM students WHERE studentCode = 'somecode'")
Of course DB is the name *I* chose in my program for the database
connection. I have no idea what name Access uses for it's own self
generated forms, and I've spent some amount of time trying to find out!
Well, in VB this works:
db.Execute ("DELETE FROM students WHERE studentCode = 'somecode'")
Of course DB is the name *I* chose in my program for the database
connection. I have no idea what name Access uses for it's own self
generated forms, and I've spent some amount of time trying to find out!
However, my problem gets a bit more complicated now. I've
designed a delete query and it works fine, but i want to
put that query on a form...somehow. I tried assigning it
to a command button, but it won't let me select the
delete query. I was thinking maybe Access won't let u
put a delete query on a form???
Its all ok, i found it. The wizard never allowed me to
select the delete query, so i selected another query, went
into the code, and changed the name of the selected query
to the one that i wanted. Thanx Adrian for you help!!
However, my problem gets a bit more complicated now. I've
designed a delete query and it works fine, but i want to
put that query on a form...somehow. I tried assigning it
to a command button, but it won't let me select the
delete query. I was thinking maybe Access won't let u
put a delete query on a form???
The wizards (and the Documenter) apparently can't see delete queries.
It's a bug.
What you can do is use the wizard; pick some query that you *can* see;
then go into the VBA editor and edit the button's Click event code to
change the name of the query that's being executed.
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.