Question ACCESS 2003 how do I embed SQL in a button on a form

wandana

New member
Local time
Yesterday, 21:10
Joined
Jul 25, 2012
Messages
9
I am new to ACCESS, I have some experience with SQL, VBA and RDBD having been trained by ORACLE

The attached tables come from a RB I am making, I can run the SQL and it works, I have failed to create form or report tha enables users to simple use a button to invoke that code.

Several people have sent answers but I have not made them work, the tutorials that I have looked do not explain with simple examples that I can follow.

Any ideas anyone?

Best wishes,
Jim
 
I cannot see an attached file

Anyways, to execute SQL code, you need to use the Currentdb.Execute method or Docmd.runsql method. I prefer the former.

Enter that on the on_click event of your command button
 
Thanks Sam,

I will try to attach the code again,
I have seen the DoCmd idea described somewhere else but my attempts to utilise it failed.

If I can send the code and tables, maybe you could use it as an example, I am sure my errors are syntax, spelling or somesuch!

Thanks and Best wishes, Jim
 

Attachments

Users who are viewing this thread

Back
Top Bottom