In Excel 2002 using VBA, I am attempting to do a Database query. I have a simple form that contains a textbox and a command button to run the code. I recorded a macro which grabbed most of the code I needed to run the query. I then copied that code to my form command button. I am setting a variable but the code keeps breaking on the .Refresh BackgroundQuery:=False attribute. When the code gets to this point I get a 'Run-Time error '1004': General ODBC Error. When I press the Debug button it stops on .Refresh BackgroundQuery:=False piece of code.
Can someone point me in the right direction and tell me where I am going wrong? Any advice at all will be appreciated. Thanks! Jody
Bookmarks