Search results

  1. T

    Form not updating with query control source

    Got a solution to this now I have a subform in it whose control source is querying the current score. This is calculated thus: SELECT tblPatient.Patient_Name, tblEpisode.EpisodeID, tblPatient.Unit_Number, tblPatient.PatientID, tblEpisode.Hypertension, tblEpisode.PastMedical_LVSD...
  2. T

    Form not updating with query control source

    Tried the other solution - as expected the same result. Sorry but cannot see value in hiding two fields when user needs to see them so they can respond yes/no :) Ultimate goal here is to create a score based on series of yes/no answers
  3. T

    Form not updating with query control source

    Cool. I have tried =IIf([PastMedical_StrokeTIA]="Yes",2,0) + IIf([Hypertension]="Yes",1,0) in the control source but the result is #Name?
  4. T

    Form not updating with query control source

    With my method.
  5. T

    Form not updating with query control source

    Aha - well well well. I didn't realise you could do that! Should have updated this thread as I have something working now. I have a sub form in my form which works (query control source), but it doesn't update the score unless you close and then open the form?
  6. T

    Import mutliple CSV files into one Access table

    Think i crackd it. Imported first table and renamed Field1 to F1 etc and bingo!!!
  7. T

    Import mutliple CSV files into one Access table

    I found this expression.TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage) and set hasfieldnames to false Now the error message is Field F1 doesn't exist in MyTable
  8. T

    Import mutliple CSV files into one Access table

    all the csv files are the same. None of them have row headers, the first line is data. I can't see the setting in the Import spec to say if there is a header in the first row though. How do I set up the option in the docmd.transfertext statement Gemma?
  9. T

    Import mutliple CSV files into one Access table

    Hi Gemma I did try it manually and can see the problem. I am not sure though how to regard the first row as data when I import the data? There is an option to choose 'first row contains headers'. I have checked/unchecked that but the same problems comes. When importing the code is looking...
  10. 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...
  11. T

    Displaying variables in form objects

    Doh! I forgot the else statement and THEN. 'Rodney you plonker' lol
  12. T

    Import mutliple CSV files into one Access table

    Thanks Gemma. I wondered, I have specified the Import specs here DoCmd.TransferText acImport, ImportSpec, "MyTable", filename, True It is ImportSpec. Now when I execute the code I get Field 'AL1 1AE' doesn't exist in the destination table' What is happening is that all 120 CSV...
  13. T

    Import mutliple CSV files into one Access table

    If intFile = 0 Then MsgBox "No files found" Else 'cycle through the list of files For intFile = 1 To UBound(strFileList) filename = path & strFileList(intFile) DoCmd.TransferSpreadsheet acImport, TransferText, "MyTable", filename, True Next intFile End If End Sub gives same...
  14. T

    Import mutliple CSV files into one Access table

    Weird I changed the Do.cmdTransferSpreadsheet to DoCmd.TransferSpreadsheet acImport, acSpreadhseetTypeExcel12Xml, "MyTable", filename, True and now I get error 3170 "could not find installable ISAM"
  15. T

    Import mutliple CSV files into one Access table

    Hmmm. this is strange. Now have "action or method requires a tablename argument" If intFile = 0 Then MsgBox "No files found" else 'cycle through the list of files For intFile = 1 To UBound(strFileList) filename = path & strFileList(intFile) DoCmd.TransferSpreadsheet acImport...
  16. T

    Import mutliple CSV files into one Access table

    this time filename = path & strFileList(intFile) was highlighted
  17. T

    Import mutliple CSV files into one Access table

    Hi gemma tried that and still get the same error
  18. 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...
  19. T

    Displaying variables in form objects

    Hi vbainet I am not puzzled with the IF statement construction but how to display the variable SCORE on my text box?
  20. 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 =...
Back
Top Bottom