Search results

  1. T

    Combo box selection to drive filter for query

    I was making this wayyyyyyyyy to hard. I stripped out the VBA and added a requery macro to execute afterupdate for the facility (first combo) using the second combo box name in the control source of the requery macro. I noted the first combo, [forms]![formname]![field] in the second combo...
  2. T

    Combo box selection to drive filter for query

    I have a combo box which selects for facility. I want to use that selection to filter a query which is the data for a second combo box. The code properly identifies the selection from the facility, "DefinedUnitList" but I get a runtime error "The field is to small to accept the amount of data...
  3. T

    VBA Code to pull records based on user selection

    works great, thanks
  4. T

    VBA Code to pull records based on user selection

    I have a dropdown list generated from data validation that allows a user to pull various sheets based on the list selection in field d17 of home sheet. A macro "Go" button executes the code on click. If Sheets("Home").Range("d17") = "3B" Then Sheets("Home").Visible = True...
  5. T

    Median and Undefined Function Error

    Just so we're clear and before we go much further, my intent here is to get the fundamental code so I can use a median within a query. I will eventually want to perform sorts and groupings, and use in reports. Just want you to understand my final goal before you spend a lot of time, so that...
  6. T

    Median and Undefined Function Error

    Yes, I would still need to prompt the dates for the report. The dates are user imputs from the underlying source query as: BETWEEN [Starting Date MM/DD/YY] AND [Ending Date MM/DD/YY] The date imputs are pulling from: Query: qry_Main Table Sort Field: Date of Stemi Thanks again.
  7. T

    Median and Undefined Function Error

    Thanks for the feedback. It was pointed out to me that I had two additional input statements from the source query that I was using to limit the amount of records pulled back that was causing the VB to issue an error code. HAVING ((([qry_Main Table Sort].[Date of Stemi]) Between [Starting...
  8. T

    Median and Undefined Function Error

    So can I not run the Median function with this Between statement? I need to be able to limit the amount of data pulling back from the source table. Need more feedback. Thanks
  9. T

    Median and Undefined Function Error

    The name of the query where this is run is: TEST Median and the SQL for the source query is below: SELECT [qry_Main Table Sort].[MD Table].Group, [qry_Main Table Sort].[MD Table].[Dr Name], [qry_Main Table Sort].[MD Cardiac], [qry_Main Table Sort].[Date of Stemi], Month([Date of Stemi]) AS...
  10. T

    Median and Undefined Function Error

    Both of those ideas helped. Thanks. However, I now have a new error code, .....To Few Parameters, Expect 2..... Runtime Error 3061. Debugging places the error in this section. Set ssMedian = MedianDB.OpenRecordset("SELECT [" & fldName & _ "] FROM [" & tName & "] WHERE [" & fldName & _...
  11. T

    Median and Undefined Function Error

    I have a module with the Microsoft suggested median function as below: Function Median(tName As String, fldName As String) As Single Dim MedianDB As DAO.Database Dim ssMedian As DAO.Recordset Dim RCount As Integer, i As Integer, x As Double, y As Double, _ OffSet As Integer Set MedianDB =...
  12. T

    Multiselect listbox and reporting problem

    I have a multiselect text data element (listbox) on a form that stores data in a main table. From this main table (and only this table) I have a query that correctly displays the multi-select objects as text. However, when I add the field into a report, using only the query based off only the...
  13. T

    Multiselect Listbox and Reports

    No it was only linked to the one table. Decided to remove the field, save and then add again... and it worked. Odd... but it worked. thanks for the help.
  14. T

    Multiselect Listbox and Reports

    I have a multiselect listbox which is stored in a table. I then have run a query from that table and it accurately displays all the selected field items. (as descriptive text, not as numerical code). However, when I build a report and pull the query field into the report, it displays as the...
  15. T

    Multiply by -1 problem

    I finally got it. yes, I did need to change the field name, but the calc that worked was: =(-([SumOf Field])) Thanks for your assistance.
  16. T

    Multiply by -1 problem

    Sorry, but that also did not work. I changed the name of the field to field 101. Then defined =Abs([SumOf Field]) - but when I ran the report, I saw the database flash and convert the field back to SumOf Field before running the report. So then I went to the builder and defined as...
  17. T

    Multiply by -1 problem

    The query is the source of the report. There are no other textboxes with the same name. Very simple straight forward report. Just pulling in fields from a query. Unfortunately, this is a medical application - so confidential information would be available, so I cannot post. However, will...
  18. T

    Multiply by -1 problem

    You'd think that would work, but I get an error. The report lets me run it (ie. no error prior to running the report - as if the code was wrong) - error shows up on the report. Expanded the field, set to fixed with 0 decimals - but continue to get error.
  19. T

    Multiply by -1 problem

    I have a query which sums a yes/no selection box resulting in a negative sum. I then pull this value into a report. In the past I have been able to multiple the Sumof Field by -1 to correct the value to a positive integer within the field properties in the report. However, my mental block...
  20. T

    Undock data table from Chart

    Thanks for the effort. At least it's good to know that this is not something simple I'm missing. Wish I could figure it out though - it has some nice benefits.
Back
Top Bottom