Recent content by Thicko

  1. T

    the table is already opened exclusively by another user

    FROM qryClinicalTrialLabel RIGHT JOIN ((((((tblChemoPreparation INNER JOIN tblDrugList ON (tblChemoPreparation.ChemoRoute = tblDrugList.DrugRoute) AND (tblChemoPreparation.ChemoPreparation = tblDrugList.DrugName)) INNER JOIN tblChemoRecord ON (tblChemoPreparation.ChemoRoute =...
  2. T

    the table is already opened exclusively by another user

    IIf(Not IsNull([TotalFixedFinalVolume]),[TotalFixedFinalVolume],IIf([Route] Like '*Cont. Inf*',([ContiniousInfusionRate]*[ContinuousInfusionTimeHrs])+Nz(DLookUp('PumpResidualLineVolume','atblStockLookupLocal2','[PumpFlowRate]=' & RemoveAlphasNotDecimalPoint([Route]) &...
  3. T

    the table is already opened exclusively by another user

    My initial thought was to look for atblChemoWSAll (Output table) being used as the source and output, especially when it came to the custom function but no crossover. I don't like create table queries and only comes as a last resort. In this case the Data is put into a local table, in this...
  4. T

    the table is already opened exclusively by another user

    So I have a create table query in vba and there's a problem with the RemoveVol line, (I've only shown this part as substantial code). In the event that the iif goes down the iMaxWithReconstitutionMinLimit function (custom function) the table fails to fill in the RemoveVol column and subsequent...
  5. T

    Best approach to calculate if required dose possible from multiple different stock sizes

    Thank you MajP this has been a huge help and stopped me spending a lot of time on what I fear would have been a sub standard solution.
  6. T

    Best approach to calculate if required dose possible from multiple different stock sizes

    MajP that's a stunning solution, runs supper fast and I can build the start point on stock sizes available so Wow. The fact that the solution gives a Dosage Pattern a few rules can select the best pattern for our purpose to use later on in the code. This option will speed up the later...
  7. T

    Best approach to calculate if required dose possible from multiple different stock sizes

    Thank you all, got a lot to think through. At this point it's a quick check to see if it would be possible. Later on there's code to consider all the variables, expiry time, stock levels, min number of doses, average usage of size, but that runs at a part when the hourglass can kick in and the...
  8. T

    Best approach to calculate if required dose possible from multiple different stock sizes

    We have a manual process where if a 250mg dose of Drug A is required, we give 120mg + 75mg + 55mg as 3 separate doses, or (2 x 75mg) + 100mg, or (2 x 80mg) + 90mg What I'm after is the best way to calculate if the available dose is divisible by any combination of 120mg, 100mg, 90mg, 80mg, 75mg...
  9. T

    Refreshing a form in another session

    Thank you all. It was a long shot but appreciate affecting another PC running the same database is a no go. I'll go with the Interval Timer option and see how it works.
  10. T

    Refreshing a form in another session

    Hi All, We have an Access front end with SQL Server backend. What I want to achieve is when a user in the pharmacy performs an action to say treatment is ready (table updated) the form that appears on the ward (and run on a separate PC) gets refreshed to inform them that treatment is ready. I...
  11. T

    Function Reference an Arguement

    Previously tried the Eval option but no joy. There's two tables, one table tblDrugListWeight contains the name of consumables up to 30 and each has a corresponding number from 1 to 30 (ConsumableNumber) A second table has a Drug & a dose band and against each band there is the number of each...
  12. T

    Function Reference an Arguement

    Hi All, Really thought this was going to be straightforward but: I have a function that I want to return the number of a consumable to use. The function is run through a query There's 30 consumables C1 to C30 If the DLookup is true I want to return the corresponding consumable e.g. e.g...
  13. T

    Function in query criteria

    Brilliant MajP, that's got it working. Many Thanks All
  14. T

    Function in query criteria

    Thanks plog. The code after the IF statement is run because I get the correct output from the Debug.Print Just incase I have changed the function to: Dim CurrentForm As String If CurrentProject.AllForms("frmStockEntry").IsLoaded Then CurrentForm = "frmStockEntry" Else If...
  15. T

    Function in query criteria

    Hi All, I have below function that is used return a field name depending on which form is open (which type of stock is being booked in) Public Function WhichStockEntryFormIsOpen(FieldName As String) As Variant If CurrentProject.AllForms("frmStockEntry").IsLoaded Then...
Top Bottom