Recent content by sear100

  1. S

    Problem Initialising Date and Time variables

    Sorry for the very delayed reply! That was perfect thank you! So simple... (Duh!):eek:
  2. S

    Problem Initialising Date and Time variables

    I am writing a process for a hospital application in the UK We have a concept of "Takes" which are periods to which patients coming into hospital are assigned to and thus the consultant (specialist) who looks after them. They are fixed times between 0800-2000 (Day take) and 2000-0800 (+1)...
  3. S

    TRIM function for numbers

    Hi Ken and Jdraw, Thanks for pointing out the failing! Could you suggest how I'd write it as a string which would collapse to "" (empty space if there is no corresponding value in the table? I'm a little unfamiliar with creating strings in reports.... e.g my old favoured trick of =("...
  4. S

    TRIM function for numbers

    Dear All, I have a report that contains several numeric fields for Blood tests. I am currently using the "TRIM" function to great success in the following format =Trim("Last Bloods: " & [dtmBloodsLast] & " Hb " & [intHb] etc..... However When I try to Bracket out any fields that do not...
  5. S

    Cannot Assign a Value Error

    After essentially a trial and error process this finally worked - I avoided the "pass me a variable" routine entirely. To open another form based on the Primary key of the form that you are coming from Private Sub YOURBUTTON_Click() Dim vid As Long Dim crit As String vid = Me.YOURPRIMARYKEY...
  6. S

    Cannot Assign a Value Error

    Hi pr2-eugin and James, I'm actually just opening a form which gives a summary field of all the text fields in a table e.g. =Trim("Diagnosis: " & [txtDiagnosis] & (Chr(13)+Chr(10)+"Surgery: "+[dtmLastSurgeryDate]+"| "+[txtSurgeryText]) & (Chr(13)+Chr(10)+" |Complication: "+[txtMandMType]+"...
  7. S

    Cannot Assign a Value Error

    FYI....The line which hits out the error is "Me.intPatientID = glbPatientID"
  8. S

    Cannot Assign a Value Error

    Hi I've tried copying my code between the two and I still get the error! I've also tried the "on Load" method as well.... If it's any help at all on "frm_PatientsInfoSummary" I am using =Trim(....etc ) as one of the text boxes?
  9. S

    Cannot Assign a Value Error

    Hi All, have a form frm_Inpatients with a command button that loads another form frm_PatientInfoSummary. I am trying to pass the primary key (or some other identifiable variable) from one form to another so that it load's the right info in the other form. My Globals are declared in a seperate...
  10. S

    Search Form vba: searching by date

    Dan - you've saved the day For the record also for "positive" searches the following works and feeds into the search as well. 'If Tick box is checked only searches for those on Antibiotics If Me.chkAntibiotics = True Then If crit <> "" Then crit = crit & " and " crit = crit &...
  11. S

    Search Form vba: searching by date

    Hi BlueishDan, Sorry for the delay - I had an extreemly hectic last week! The full working code was: Private Sub btnPatientSearch_Click() 'Searches Patient Database and draws records depending on Criteria Entered on the form Dim crit As String 'Searches between two dates Admitted If Not...
  12. S

    Search Form vba: searching by date

    No it didn't work actually. Do I need to add it as another string? If so how would that then plug into the query at the end?
  13. S

    Search Form vba: searching by date

    There may be a transliteration error as I was wrote copy typing from a laptop. I've just found a way to get access to my original actual code that's in the database. The original code was as follows: Private Sub cmdContinue_Click() Dim crit As String If Not IsNull(Me.txtPatientID) Then...
  14. S

    Search Form vba: searching by date

    Hi Dan - that's certainly a very cool piece of code. If I'm reading right it helps create a new form based on a table no? I had a look in the module and the class modules but couldn't see any code which helped specifically with my issue here ie. search forms. I'd be grateful if you could point...
  15. S

    Search Form vba: searching by date

    Dear All, It’s been many months since I was last on the forum. I was wondering if I can get some help and education with regards to coding a search form. The database is a patient database used for tracking Inpatient data and Handover (or Handoffs for those in the US). It has been merrily...
Back
Top Bottom