Search results

  1. G

    Fix aggregate column location in crosstab query

    I got it to work! I ran the crosstab query. The datasheet display had the 'File Totals' column in the 2nd column. So I moved it to the last column and saved it. (Which I had done before). When I opened the View Data Form, The 'File Totals' column was in the last position, which I...
  2. G

    Fix aggregate column location in crosstab query

    I did replace the query name and field name of the FixCrosstabOrder method. This is the code: Public Sub FixCrosstabOrder() Dim db As DAO.Database, qd As DAO.queryDef, fld As DAO.Field Dim intI As Integer ' Point to this database Set db = CurrentDb ' Get the querydef Set qd =...
  3. G

    Fix aggregate column location in crosstab query

    The output is the same as before... The 'totals' column is the second column in the form view and the sql datasheet view. The order is as follows: Column 1 - Name Column 2 - File Totals Column 3 - Excel Column 4 - Word Column 5 - PowerPoint Column 6 - PDF Column 7 - Email Column 8 - Other If I...
  4. G

    Fix aggregate column location in crosstab query

    I'm afraid it is still not working so I must be doing something wrong elsewhere. Below is the order that I am calling things: Set LegalServiceDB = CurrentDb 'Get the current version of the query that is used by the crosstab query Set queryDefinition =...
  5. G

    Fix aggregate column location in crosstab query

    Where do you call the FixCrosstabOrder? I have put it after setting the SQL statement but before setting the SourceObject. I have put it after setting the SourceObject. But STILL the wrong order change! I have stepped thru the code and all of the 8 columns are being set with the correct...
  6. G

    Fix aggregate column location in crosstab query

    I have moved the SetProperty method at different parts of the code and it does not change anything. 'Set the new SQL string queryDefinition.SQL = sqlQuery ' Call the procedure to set the ColumnOrder property. Call SetFieldProperty(queryDefinition.Fields("File Totals"), "ColumnOrder", dbLong...
  7. G

    Fix aggregate column location in crosstab query

    When I run the query by itself, the 'File Totals' column is the second column in the display which is the same order if I run it using the Form. The typo defining the name of the crosstab query is a copy error. There are no errors when I run the code. It just displays the column in the wrong...
  8. G

    Fix aggregate column location in crosstab query

    totalFields is an integer variable that I declare in functions that call the SetQueryDefFieldProperty method. The column order for [File Totals] is being set correctly because I have a message box display the value after it is set and it is set to 8 during the Form_Load method. Yes. [File...
  9. G

    Fix aggregate column location in crosstab query

    The column order of the other fields is set in the query when I use PIVOT ..."PIVOT TotalFileCountByNameAndType.FileType In (""Excel"",""Word"",""PowerPoint"",""PDF"",""Email"",""Other"");" Do I have to set the column order for all of the columns like I did with the File Totals column?
  10. G

    Fix aggregate column location in crosstab query

    No. It is in the 2nd of the 8 columns. Stepping thru the code, the column order value is 8. Yet it has no affect on the order of the columns. This is me being dense...but I don't understand how I can define a property for a field in a table and the query understands it has changing the order...
  11. G

    Fix aggregate column location in crosstab query

    I have tried putting the SetQueryDefFieldProperty(totalFields) method before setting the SourceObject property but still no luck. I have also tried calling the SetQueryDefFieldProperty(totalFields) before calling the UpdateFileTotalsDatasheet method that updates the sql query but no change in...
  12. G

    Fix aggregate column location in crosstab query

    I have to rebuild the query every time the user selects an option on the screen. But initially, I use the Form_Load method to display all of the data. After the initial load the following methods are called when each control is clicked. So I build the query (Sub CreateTotalSQLString) Then...
  13. G

    Fix aggregate column location in crosstab query

    I have tried creating a property to define the column order but it is not working...the column is still second. It sets the column value to 8. But I don't understand how it will change the display. in the query, I use ...PIVOT In (list of all of the column headings) to determine the order...
  14. G

    Fix aggregate column location in crosstab query

    Thank you for replying... I will try this
  15. G

    Fix aggregate column location in crosstab query

    I have created a crosstab query that shows file types as the column headings and names as the rows. The aggregate function sums the files per type for each name. I know how to fix the column order for the file types using the PIVOT statement shown below: ..."PIVOT...
  16. G

    Updating subform data with control input

    I figured it out. For anyone else who has this problem, this is how I fixed it... My subform was a Subform control, not a subform Form. To determine which one you have, look at the Properties of the object. If the object gets its data using a Source Object, it is a control. If the object gets...
  17. G

    Updating subform data with control input

    Hi, I am having trouble updating the data in a subform after the user selects data from a control. This is the design of the form... I have a set of controls (ListBox, CheckBoxes, and Date Enters). Below these controls is a subform that has a datasheet that displays data using a crosstab...
Back
Top Bottom