Search results

  1. CJBIRKIN

    Extract part of a text

    Hi, didn't think about that:D Public Function GetLastSentence(StrMemo As String) Dim StrNew As String Dim IntStrPos As Integer IntStrPos = 1 ' ADD THIS ' THIS PART DETERMINES IF THERE IS A RETURN CHARACTER If InStr(IntStrPos, StrMemo, Chr(10)) = 0 then 'IF THERE IS NO RETURN CHARACTER...
  2. CJBIRKIN

    Extract part of a text

    Hi Try this in a module. Public Function GetLastSentence(StrMemo As String) Dim StrNew As String Dim IntStrPos As Integer IntStrPos = 1 Do Until IntStrPos = 0 IntStrPos = InStr(IntStrPos, StrMemo, Chr(10)) If IntStrPos <> 0 Then StrNew = Mid(StrMemo, IntStrPos + 1) '...
  3. CJBIRKIN

    What's your best/worst joke?

    Hi guys, Not sure if we've has this one, Trying to keep up but way to many now. The SAS, the Parachute Regiment and the Police decide to go on a survival weekend together to see who comes out on top. After some basic exercises on their first day, the trainer tells them that their next objective...
  4. CJBIRKIN

    Forms filtering question

    Hi Having concocted a quick test using the forms wizard 2 things strike me. 1: the sub form must be open before filtering. If ChildFormIsOpen() Then CloseChildForm Else OpenChildForm <--------- HERE! FilterChildForm End If Yours would be If...
  5. CJBIRKIN

    Rename a file

    Hi From my VB6 days Name oldname as newname Oldname & Newname are paths like "C:\test.txt" Name "C:\test.txt" as "C:\test2.txt" It does work in access97 not sure about 200~ Chris
  6. CJBIRKIN

    add days + 1 extra if past 29 Feb

    Hi This should work Dim DT As Date Dim NEWDT As Date On Error GoTo NOLEAP DT = CDate("29/02/" & Year(Date)) If DateAdd("D", 40, Date) >= DT Then NEWDT = DateAdd("D", 41, Date) Else NEWDT = DateAdd("D", 40, Date) End If NOLEAP: NEWDT = DateAdd("D", 40, Date) Bascially cdate will...
  7. CJBIRKIN

    Update... table1.column=table2.column where table1.id=table2.number

    Glad that clears that up then!
  8. CJBIRKIN

    Update... table1.column=table2.column where table1.id=table2.number

    Sorry for the delay couldn't get back into the site yesterday. Anyway; So i assumed you'd tried to run the query and it had given you an error message. I created a quick DB and used the query builder to get the following Sql which is identical to yours; UPDATE TABLE1 INNER JOIN TABLE2 ON...
  9. CJBIRKIN

    Update... table1.column=table2.column where table1.id=table2.number

    Hi Can you be a bit more specific about the problem i.e what is happening when you run your query? Chris
  10. CJBIRKIN

    Random query question

    Hi For the last bit of the why not use the current record rec#ID from the form as a criteria in the query <> form!formname!id (not sure of syntax here) So the query can only select a record that isn't shown in the form. Hope that makes sense. Chris
  11. CJBIRKIN

    exprexssion

    Hi You can use the isnumeric function as follows Create a module enter Public function GetFirstVal(StrFieldData as string ) as integer if isnumeric(Right(StrFieldData,1)) = True then GetFirstVal = Right(StrFieldData,1) else GetFirstVal = mid(StrFieldData, len(StrFieldData)-1,1) end if...
  12. CJBIRKIN

    Passing Subform as Variable

    Hi Rich Thanks for your help, I don't know why this isn't working but i still get the error message "unable to find form ....". The form name is being "sent" to the function but the (SET?) frmTemp = Forms(strName) generates the error. Not to worry. I was overly complicating things anyway...
  13. CJBIRKIN

    Passing Subform as Variable

    Hi Sorry for lack of clarity; probably trying to be to clever for my own good. I have a main form called FRM_FRAMES that contains 2 unbound subforms. the first is called FRAME_1 and can contain a variety of menus(buttons) depending on selections made. The second is called FRAME_2. This...
  14. CJBIRKIN

    Passing Subform as Variable

    Hi I have an unbound subform whose sourceobject changes. I need to pass the subform as a variable to a module. To complicate matters slightly i have a main form with an unbound subform as well. Forms!FRM_FRAMES!FRAME_2 main form and unbound subform Frame_2 then takes the form with the...
  15. CJBIRKIN

    is there a good Dbase for a PDA

    Hi I've been working ona moblie DB for a while now using an Ipaq H5400. Basically one of the Hospitals i work with are developing a Wireless Network which i could use. This would allow me to develop a website to interact with the database rather than having to try and develop a VBE or VBC front...
  16. CJBIRKIN

    subform recordsource change

    Hi found the answer. The frame_1 was loading before frame_2 creating the errors, DOH! so i forced the frames to load their (sourceobject) forms in reverse and then used. Forms("FRM_FRAMES")!FRAME_2.Form.RecordSource = StrRecSource. on the onload event of the form in frame_1 and no more...
  17. CJBIRKIN

    subform recordsource change

    FUDGE Hi I got round the problem with a fudge. I passed the SQL string to a private variable at module level using a set function, then i call the data on the form load event of FRM_SELECT_AUDIT (frame_2) with a get function. The problem is i have search facilities on the FRM_AUDIT_MENU...
  18. CJBIRKIN

    subform recordsource change

    Hi I tried both methods and came back with identical error messages as i had. I don't understand how this can be. Have you any other ideas?? I'm stumped. Cheers Chris
  19. CJBIRKIN

    subform recordsource change

    Hi For reasons best left unsaid i am trying to change the recordsource of an unbound subform from a button on another unbound subform. mainform = Frm_Frames Subform = FRM_AUDIT_MENU subform called FRAME_1 Subform = FRM_SELECT_AUDIT subform called FRAME_2 Simply, i collect an SQL string from...
  20. CJBIRKIN

    Find Gated Dates In Table

    Hi Thanks guys i'll have a look at this today. Chris
Back
Top Bottom