Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Oct 2009
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi apologies for a super easy query here - I've tried searching for an answer but probably am not putting it correctly. I have a query which I'm pasting into an on click event, but its too long for the window - I remember that there is a very simple mechanism for carrying it forward, but I just can't remember! (too much brandy over Xmas.....) here's what I mean - I think its something like "& _ but I cant get it to work.... so the line breaks at the point of the ' " '

    DoCmd.RunSQL "INSERT INTO SubProcesses ( [Process Name], [Process Description], [Process BAU or Project?], [Sub-Process Name], [Sub-Process Description], [Sub-Process BAU or Project?], [Process % Complete], [Process Actual Start Date], [Process Actual Completion Date], [Sub-Process Flowcharts/ Narratives Complete & Attached?], Status, [Sub-Process Baselined Start Date], [Sub-Process Baselined Completion Date], [Sub-Process Revised Start Date], [Sub-Process Revised Completion Date] ) "

    SELECT SubProcessesIn.[Process Name], SubProcessesIn.[Process Description], SubProcessesIn.[Process BAU or Project?], SubProcessesIn.[Sub-Process Name], SubProcessesIn.[Sub-Process Description], SubProcessesIn.[Sub-Process BAU or Project?], SubProcessesIn.[Process % Complete], SubProcessesIn.[Process Actual Start Date], SubProcessesIn.[Process Actual Completion Date], SubProcessesIn.[Sub-Process Flowcharts/ Narratives Complete & Attached?], SubProcessesIn.[Sub-Process Documentation Status], SubProcessesIn.[Sub-Process Baselined Start Date], SubProcessesIn.[Sub-Process Baselined Completion Date], SubProcessesIn.[Sub-Process Revised Start Date], SubProcessesIn.[Sub-Process Revised Completion Date] FROM SubProcessesIn;

    Thanks for your help!

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is this what you needed:

    & vbCrLf & _

    Used like the following example:

    strMsgPrompt = "Confirm Selection" & vbCrLf & _
    "Selecting This Option Will Over-Write" & vbCrLf & _

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Try this (or something like it)

    Code:
    strsql = "INSERT INTO SubProcesses ( [Process Name], [Process Description], [Process BAU or Project?], [Sub-Process Name], [Sub-Process Description]," _
    & " [Sub-Process BAU or Project?], [Process % Complete], [Process Actual Start Date], [Process Actual Completion Date]," _
    & " [Sub-Process Flowcharts/ Narratives Complete & Attached?], Status, [Sub-Process Baselined Start Date], [Sub-Process Baselined Completion Date]," _
    & " [Sub-Process Revised Start Date], [Sub-Process Revised Completion Date] ) "
    docmd.runsql strsql
    Regards,

    Gary
    (It's been a while!)

  4. #4
    Lounger
    Join Date
    Oct 2009
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks folks, I eventually remembered that I used to use " & _ and that seems to be working fine. Many thanks for your responses and happy new year.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •