The information in this article applies to:
SYMPTOMSIn Microsoft Excel, if you run a Visual Basic procedure that uses the SQLREQUEST function, the procedure returns an error message or an incorrect result if you run the procedure from a command button or from a toolbar button. CAUSEThis behavior occurs only when you assign the procedure to a command button or a toolbar button, and run the procedure from the button. The correct result is returned when you run the procedure that contains the SQL function from the module sheet, or from the Macro dialog box. WORKAROUND
To avoid receiving an incorrect result or an error message when you
choose a toolbar button to run a procedure that uses the SQLRequest
function, call the procedure from another procedure, and then do the
following to assign the calling procedure to the toolbar:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel version 5.0c for Windows. MORE INFORMATIONThe SQLREQUEST function is available in the XLODBC.XLA. You can use this function in a Visual Basic procedure by creating a reference to the XLODBC.XLA file using the References dialog box (Tools menu). REFERENCESFor more information about the SQLRequest Function, choose the Search button in the Visual Basic Reference and type: SQLRequest Function Additional query words: err msg2004 run-time cannot connect to database access xlodbc.xla 2042
Keywords : xlquery |
Last Reviewed: September 21, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |