Search results

  1. T

    Latest date

    Hi all I have a table called dbotransfer with a list of transfer episodes (Primary key is EpisodeID) Another table called dboTransferJournal has a list of journal entries relating to episodes. in dbotransfer table. (One to many relationshuip set up) There are several journal entries for...
  2. T

    Order integer in cross tab query

    In a query I have a field Days: Int(IIf(tbl_Data!DaysRequestToProcedure1<0,"0",IIf(tbl_Data!DaysRequestToProcedure1>=12,"12",tbl_Data!DaysRequestToProcedure1))) That field is referenced in a cross tab query PARAMETERS [Forms]![frmRptDialogSingle]![begdate] DateTime...
  3. T

    DoCMDRequery creates new record?

    I have a form that has a a series of list boxes on it. These list boxes are warnings for the staff that follow up is needed to treat patients see attachment If we take the embolic risk listbox (see right), click on a patient in that list, then on the form on the left, go to the discharge tab...
  4. T

    DoCMd Refresh

    I have a form frmPatient which has a sub form in it called subfrmEpisode. In that subfrmEpisode is another sub form called subfrmscore. When I add a new patient, and start to add data in the subfrmepisode, the score in subfrmscore is supposed to update, but it doesn't unless you close and open...
  5. T

    Cross tab query - group hours

    I have a table with ID Time (hh:mm) Hospital Is there a way I can set up a cross tab query that counts the number of episodes for each hospital between the hours of 00:00 - 00:59 01:00 - 01:59 ?? Cheers in advance
  6. T

    Why is report not in date order

    I have a report whose query is PARAMETERS [Forms]![frmReport]![startdate] DateTime, [Forms]![frmReport]![enddate] DateTime; TRANSFORM Nz(Count(qryEpisode.EpisodeID),0) AS CountOfID SELECT Format([Date_Referred],"yyyy/mmm") AS [Date] FROM qryEpisode WHERE (((qryEpisode.Date_Referred) Between...
  7. T

    Merge date time fields

    I have a two fields in a hospital admissions query that has been sent to me. I am trying write query to find which of those were out of hours (between 2000 hrs and 0800hrs) and which were in working hours (0800hrs and Date dd/mm/yyyy Time hh:mm:ss I want to find out I was wondering how I...
  8. T

    Form not updating with query control source

    I have a form that captures yes/no responses. The forms control source is a table called tblEpisode I have a query called qryEpisode, here is part of it: SELECT tblPatient.Patient_Name, IIf([PastMedical_StrokeTIA]="Yes",2,0) AS StrokeTIAChadsVasc, IIf([Hypertension]="Yes",1,0) AS...
  9. T

    Import mutliple CSV files into one Access table

    I have over 100 CSV files all with the same format and structure. I have imported one of those into a new table in Access but I do not want to have to do this one by one for each CSV!. In a bid to solve this I searched for a piece of code that could handle batch imports. Private Sub...
  10. T

    Displaying variables in form objects

    HI there I have a few fields Diabetes Stroke and what I am trying to do is have it so a score is generated based on whether a patient has yes against those items So far I have set up a textbox and in the afterupdate bit I have Dim score As Integer score = 0 If Me.DM = "Yes" score =...
  11. T

    Form validation - yes that old chestnut

    I have two date/time fields. Date referred Date seen I want to add some validation in it which says If the Date referred entered is greater than the date seen - tell the user to "Date referred cannot be entered as a date greater than the date seen"
  12. T

    Update query - where id equals

    I have a table called tblEpisode with a unique if EpisodeID. I have been given an Excel spreadsheet with a list of EpisodeID and follow up comments against each. I have added a new field to tblEpisde called FollowUpComments.I am trying to run query which updates each episode and adds the comments?
  13. T

    Reporting a Not null values

    If i have a table with most of the fields in ti being list boxes (yes/no) is there any way I can show only the fields with a 'yes' in a report. One of the fields is Discharge_meds_digoxin If the list bix option is 'yes' I want to have in the report 'Digoxin' as opposed to 'yes'? I have...
  14. T

    Unselect list boxes

    I have eight list boxes on a form. When you click on an item in a list the form populates with corresponding data. I want the list box item to 'unselect' if I click from one list box to another Here is what I have tried Private Sub ListBoxName_LostFocus() Me.OtherListBoxName = Null I...
  15. T

    Median average doesn't change with any parameters

    I have a module which creates a function to generate the median of a field 'ReferraltoTreatment' (measured in days) 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...
  16. T

    First crack at VBA! error handling

    Hi there I am braving it and trying out VBA! I have a form which enters start and end dates and then opens a report I am trying to set up error handling which asks for the start and end date and then tells the user there isn't any matching records. At the moment if I deliberately enter...
  17. T

    Form level validation - date text box

    This is rather odd. I have a form that is not bound to a table but I need to validate it. I have entered in the text box properties under Validation rule: "dd/mm/yyyy" and vlaidation txt but even if if I follow the rule the validation text still appears!!
  18. T

    Median average

    I have set up a module using the Microsoft sample: 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 = CurrentDb()...
  19. T

    Averages - data type mismatch

    I have a query SELECT Avg(qryWaitingTimes.ReferralToClinicdate) AS AvgOfReferralToClinicdate, Avg(qryWaitingTimes.ReferralToTreatment) AS AvgOfReferralToTreatment FROM qryWaitingTimes; But when I run it it comes up with data type mismatch error?
  20. T

    Validation message for indexed field on form

    Hi thereThank goodness its Friday eh?I have a form witha field in it that indexed called UnitNumber, allowing no duplicates. I was wondering how to add a validation message telling the user that the 'unit number already exists' etc if they try and enter the same numberNot the best with VBA so...
Top Bottom