PDA

View Full Version : Solved: Help - Cannot get a SQL query written in VBA to run.



Boromir45
09-28-2006, 02:47 AM
Hi,

I've just got a quick question for a problem that's completely annoying me.

I used a test database in which I used vba to create a SQL query. It worked fine so I copied the code to the main database to use the same query. The test database is just a scaled down version of the main one which has the same table structure but not as many records.

The only difference between the two is that the code for the main db has been placed onto a seperate form that will open from the main menu.

Try as I might, I cannot get the thing to work. I have gone through each line of code and there is nothing amiss but I still can't get the results.

I'm probably missing something simple but I can't see what it is.

Any ideas?

Thanks.

Boromir45
09-28-2006, 05:59 AM
I figured it out. I knew it was something simple.

I just replaced the command button on the form and all of a sudden the query started running.

I must have done something to the original command button which prevented the action.

Thanks Anyway.

Cheers