Search results

  1. N

    Customised chart built by Function: Report vs SubReport Problem

    [SOLVED] Customised chart built by Function: Report vs SubReport Problem OK so I've always been very disappointed with the limited capabilities of Charting in Access, so major review time for my database why not try and build a common function to build a customised chart (graph) for my report...
  2. N

    Number rounding error when pulling Double from Recordset

    Literally just scrolled to the top of my function and lo-and-behold i'm an idiot, everything Dim'd as Integers.... Massive Facepalm, Thanks for the catch though, i think i just beat you to it... :D:D:D:D
  3. N

    Number rounding error when pulling Double from Recordset

    I have 2 similar numbers in a table with the following parameters: Double, Fixed, DecPlaces = 2 One number (GLminor) = 0.10 Second Number (GLmaj) = 0.50 When i use the following code to create and pull the numbers from a recordset the (Gmin) is OK and displays as 0.1 but the (Gmaj) has a...
  4. N

    Negative numbers in calculations - help...

    Ok i know negative numbers can be a bugger in calculations bt i can't seem to wrap my head around this one: Function FEV1pred(height As Double, ClientID As Double) As Double Dim a As Double Dim Age As Integer Dim DOB As Date Dim TestDate As Date Age = DateDiff("yyyy", DOB, TestDate) +...
  5. N

    Subscipt / Superscript Characters in a Table

    Howdy all, looking to see if it is possible to store text in a table that includes subscript / superscript characters. As an example; need to indicate the units of measurement for some data and therefore need to be able to pull data from the table such as the following: kg/m2, m/s2 etc. In...
  6. N

    SELECT Between two Dates Troubles....

    WOW.... Tried your code suggestion with no go .... then on a whim changed the Format(Date, "dd/mm/yyyy") to Format(Date, "mm/dd/yyyy") and we have success.... I call bullshit btw on using USDates.... makes my head spin not knowing when to use which with the databases. It seems that the sql...
  7. N

    SELECT Between two Dates Troubles....

    Simply trying to set a recordset to run some update functions in the next step. I can confirm that each of the following variations of the same code work and successfully create recordsets with the number of records i am expecting. Set rs = db.OpenRecordset("SELECT * FROM tblCharges WHERE...
  8. N

    SELECT Between two Dates Troubles....

    Been having awful trouble trying to work out why the following line of code isn't working. Any assistance greatly appreciated: Set rs = db.OpenRecordset("SELECT * FROM tblCharges WHERE IsNull(InvCode) And CaseID = " & CaseID & " And ChargeDate BETWEEN #" & StartDate & "# AND #" & EndDate & "#")...
  9. N

    Multiple Value Lists DOING MY HEAD IN...

    [SOLVED] Multiple Value Lists DOING MY HEAD IN... Seriously massive thanks to anyone who can help with what i bet i a really simple thing that is currently doing my head in. I have a multiple value listbox for a survey with only 10 possible selections storing values 1, 2, 3, 4, 5, 6, 7, 8, 9...
  10. N

    Delete Record From a Subform

    Hi all, Like many of you i have to idiot proof my simple databases for the uninitiated. I currently have a main client form (frmClients) which i load with Allow.Deletions Allow.Edits and Allow.Additions all set as default to False. I then have a series of cmd buttons which toggle the...
  11. N

    Functions with multiple output?

    Hi all, I'm currently writing some fairly lengthy functions for a project to make things more efficient, but a lot of what i need to do can get quite repetitive. I would love to be able to create a function that had more than a single output. For example: (simplified) WHR = CDec(Nz(waist)) /...
  12. N

    Function Problem

    Solved Guys, seems i had an old version of the function on the form so it was defaulting to that function rather than the one in the module. I have to admit i'm a little new to the functions side of things, particularly the variant types, really atm i'm just burglarising what i'm familiar with...
  13. N

    Function Problem

    I have written the following simple function to determine the 'Best' score of three attempts. The number can range from -30 to +30 or so and are measured to 0.5 intervals. Function FlexBest(a As Double, b As Double, c As Double) As Double If CDec(Nz(a)) >= CDec(Nz(b)) And CDec(Nz(a)) >=...
  14. N

    writing functions - runtime error 6 overflow

    Solved...... Excellent, cheers folks, The divide by 0 gave me something to look at. The error was occuring with the M = SumP / SumXsq line of code which gemma-the-husky correctly identified the SumXsq as being a 0. Turns out that 1 record had a step height of 33 when the only possibles should...
  15. N

    writing functions - runtime error 6 overflow

    Hi all, I have recently started cleaning up some of my bigger databases by refining the rediculous numbers of wueries ans writing them as functions. I have written a number of functions that have all been successful so far, though this one is a bit more advanced than the others. This function...
  16. N

    Min/Max functions - Auto Decimal Places

    I have temporarily solved this problem by using the following expressions rather than the straight min/max functions: WHRMin: Min([WHR] * 1000)/1000 WHRMax: Max([WHR] * 1000)/1000 For some reason shifting the decimal place by 1000 allows the min/max functions to work properly. Subsequently...
  17. N

    Min/Max functions - Auto Decimal Places

    qryWHR sql as follow: SELECT tblTest_BodyComp1.AssessmentID, tblTest_BodyComp1.TestDate, tblClientDetails.ClientID, [waist]/[hip] AS WHR, IIf([Gender]="Male",IIf([WHR]<0.9,"Ideal (Low Risk)",IIf([WHR] Between 0.9 And 1,"Moderate Risk",IIf([WHR]>1,"High Risk","Error"))),IIf([WHR]<0.8,"Ideal...
  18. N

    Min/Max functions - Auto Decimal Places

    Additional Info: (may or may not be pertinent) Original data in the table for both hip and waist are set as follows: Field Type: Number Field Size: decimal precision: 4 scale: 1 decimal places: auto NOTE: given that avg returns a correct figure and min/max do not i can't see this as having...
  19. N

    Min/Max functions - Auto Decimal Places

    It's actually in a query but the SQL is as follows: SELECT Min(qryWHR.WHR) AS MinOfWHR FROM qryStatSelect01 LEFT JOIN qryWHR ON qryStatSelect01.AssessmentID = qryWHR.AssessmentID WHERE (((qryWHR.TestCompleteYN)<>0)); Hope this helps
  20. N

    Min/Max functions - Auto Decimal Places

    I have a stats query that i run on a collection of Waist to Hip Ratio's which are generally measured as a ratio to 3 decimal places as follows: waist = 89cm hip = 101cm WHR = 0.881 (to 3 decimal places) My problem is that the min and max functions that i am running on this set of data for the...
Back
Top Bottom