Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. juschuma

    Displaying Excel File size

    Anyone know a way to retrieve (in a macro) the size of the workbook currently open?
  2. juschuma

    Possible to copy all the values in an array to cells at once from VBA?

    I have an array called myArray(3). It's values are myArray(&quot;12&quot;, &quot;5&quot;, &quot;12&quot;, &quot;35&quot;) I want to copy each value into a cell on a spreadsheet. Usually I do something like this: i=0 Do while i < 4 Range(&quot;A1&quot;).Offset(0, i).Formula = myArray(i)...
  3. juschuma

    How to check if a range is null

    I do a macro on a selected range, but it errors out if the range contains no data. What's the appropriate error checking to do to allow me to put an error message in? Thanks.
  4. juschuma

    Creating toolbars for Excel 200 add-ins.

    I save a worksheet as an .xla file to be used as an add-in. In the worksheet, I've created a custom toolbar (and named it). However, when someone else tries to use my add-in, they get the code behind it, but not the toolbar. How do I get the toolbar to work? Do I have to code it? If so, how...
  5. juschuma

    Cancelling OutputTo gets error message.

    I have the following command in my code: DoCmd.OutputTo acOutputForm, , acFormatXLS It allows me to export the forms data to Excel. A standard Microsoft window pops up with the directories, so I can save the file. However, if I &quot;Cancel&quot; at that time, my original form returns an...
  6. juschuma

    Can't get insert into to work

    Here's my insert into statement: INSERT INTO tbl_2002YTDAmounts_V2 SELECT [GL_data].[VendorName] AS VendorName, [GL_data].[PS_Num] AS PS_Num, [GL_data].[VendorID] AS VendorID, [GL_data].[GL_Num] AS GL_Num, sum([GL_data].[2002YTDAmount]) AS 2002YTDAmount FROM GL_data GROUP BY [GL_data].[GL_Num]...
  7. juschuma

    Export from a form to excel

    Thanks for the advice. I ended up doing something different. I build a form that returned results from a query. This way when I opened the form I could pass in a where clause that I built from the main form. On the subform open event I inserted: DoCmd.OutputTo acOutputForm, , acFormatXLS...
  8. juschuma

    Export from a form to excel

    What's the best way to export data to excel from a form... Here's my situation: Main form user presses a button. This button should export the results of a query to excel. However, the query uses parameters built in the main form (from listbox, textboxes, etc.)
  9. juschuma

    Determining which is the listbox row JUST selected in a multi-select l

    I have a multi-select listbox. On the listbox_click event I want to do an If statement to see if a particular row was the one most recently selected. Is that possible? Right now, I can only figure out how to tell if it is selected at all, not if it's the one most recently clicked. Thanks.
  10. juschuma

    Can I make sort order in a report dynamic?

    That was just a typo. It should be Northeast, Pacific, Southeast. As for the ASC and DESC, I just built that into the following command: Me.OrderBy = Forms![frm_Results]![cbox_SortOrder] & &quot; DESC&quot;
  11. juschuma

    lookup in a query

    Try this...make sure the report already runs fine without your where statement. You're just adding that part in here. Put this code (after replacing the appropriate values) into your command button click event on the form. Dim stDocName As String, sqlwhere As String sqlwhere =...
  12. juschuma

    Can I make sort order in a report dynamic?

    I got it to work. Didn't need to disable any groupings. One last question. How can I make it sort by either ascending or descending in this example? Thanks.
  13. juschuma

    Can I make sort order in a report dynamic?

    I need the grouping in the design view the report should look like this: Division Pacific Vendor 1 $50 Vendor 2 $65 Northeast Vendor 3 $72 Vendor 4 $35 Southeast Vendor 5 $56 Vendor 6 $12 Vendor 7 $23 The report should be grouped...
  14. juschuma

    Can I make sort order in a report dynamic?

    I have a report that I want the user to be able to run from a form and select a sort order from a combo box. Currently I use an If statement to check which value is chosen from the combo box. I have 3 versions of the same report: rpt_Test_SortByX rpt_Test_SortByY rpt_Test_SortByZ So, based...
  15. juschuma

    Can I split a query between VB code and a Designed Query?

    I have a rather complex SQL that is used to build/run a report. Part of the where clause I need to build in VB because it uses multiple rows from a multi-select listbox. Can I only build that part of the where clause in VB and build the rest of the query in Design mode and somehow link the two...
  16. juschuma

    Can I use an * in an IN statement in SQL?

    Thank you. I just did an IF statement. If (first row is selected) Then query with LIKE * Else build query with IN statement End If
  17. juschuma

    Can I use an * in an IN statement in SQL?

    I have a multiselect listbox with the following values: * Pacific Texas Northeast Southeast Those are divisions. I'm running a query which brings back values based on what is selected in the listbox. In my VBA code, I cycle through the selected listbox rows and build an IN statement...
  18. juschuma

    dynamic listbox???

    I just did this...it might be easier than hardcoding everything...try this code... 1) &quot;lbox_Division&quot; is the first listbox 2) &quot;lbox_ROC&quot; is the second listbox which changes depending on what is selected in lbox_Division Dim intlp As Integer, strwhr As String For intlp =...

Part and Inventory Search

Back
Top