![]() I think there is a better way to set up the ODBC connection so it doesn't have to be "re-created" by a macro just to refresh it. I would like to pass the password instead of asking the user. Every time the button is pressed (and the ODBC connection is re-created), it asks the user for the password. ![]() This is what I would like to change, and there are two way I think it could be accomplished: With the QuickBooks file open, this snippet works most of the time. I attached the code to a button so the user can update the vendor list. ListObject.DisplayName = "Table_PA_Vendor_List" "r_type" & Chr(13) & "" & Chr(10) & "WHERE v_lst_vendor_type.id = v_lst_vendor.vendor_type_id AND ((v_lst_vendor.is_hidden=0) AND (v_lst_vendor_type.name='MBO'))" & Chr(13) & "" & Chr(10) & "ORDER BY v_lst_vendor.name, v_lst_vendor_type.name" _ "SELECT v_lst_vendor.name AS 'Vendor Name', v_lst_vendor_type.name AS 'Type', v_lst_vendor.is_hidden" & Chr(13) & "" & Chr(10) & "FROM QBReportAdminGroup.v_lst_vendor v_lst_vendor, QBReportAdminGroup.v_lst_vendor_type v_lst_vendo" _ ), Array("Integrated=NO Debug=NO DisableMultiRowFetch=NO")), Destination:= _ "ODBC Driver= UID=Purchasing ServerName=QB_data_engine_21 AutoStop=NO " _ With (SourceType:=0, Source:=Array(Array( _ Using primarily the macro recorder, I created a VBA macro that sets up a Vendor list connection between Excel and a QuickBooks file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |