View Full Version : Macros - Action query Problem


jannaccess
10-18-2005, 06:03 AM
Hi,

Can any one help me with my problem here. I have 10 append queries which I am trying to run using Macro. But when i tried running the macro, I keep getting an error saying the Unknown field name. But checked the particular field exist in the table. It works fine, If i run the append query seperately. I guess its a problem with the length of the append query, because its really long.

Can anyone know the solution for this, your help would be greatly appreciated.

Cheers

Jann

reclusivemonkey
10-18-2005, 06:59 AM
I don't use macros, but you can run an update query from VBA using "DoCmd.RunSQL (YourSQL)". If the append query is long, you can split it into several lines using this method;


strSQL = "INSERT ......"
strSQL = strSQL + "SELECT ...."


...using as many lines as you need. HTH.

jannaccess
10-18-2005, 07:25 AM
Thanks Mate...

Regards

Jann