Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    223

    Red face Unanswered: Creating a Contract Template

    I want to create a Contract Template which will have about 3 pages of legal wording.

    Then I want to insert the name, address etc of the person with who I make the contract - obviously this will be different for every contract. I will make a Combo List on a different Form to select the details of the other person.

    But my question is, what is the best way to do this?

    My best thought is to create a Report with a Text Box which contains all the standard wording. then insert a Text Boxes within the main Text Box where the name, address etc would go?

    I wondered if there were any other suggestions??

    Cheers,

    Red Devil

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Personnaly I would create a template for the contract in Word or in Excel, then use Automation to create a copy of the template and insert the data from Access into it. I'm not very skilled as far as Word is concerned, but with Excel it's very easy.
    Have a nice day!

  3. #3
    Join Date
    Nov 2010
    Posts
    84
    I'm on several projects using the following conceptual database model. A dominant entity is the contract with its main attributes. ContractType entity is a template with its core attributes. When you select CotractTypeID offer you as a default value that is transmitted to the contract.
    Attached Thumbnails Attached Thumbnails Contract Model.png  

  4. #4
    Join Date
    Nov 2009
    Posts
    223
    Sinndho,
    Thanks - I did not know about Automation? Well, I still don't know but I can learn Cheers.

    Eremija,
    Thanks for your reply. I am only a realtive beginner, moving to improver and, sorry but I do not fully understand your point. I will try the Excel route and see if that works.

    Cheers all.

    Reddevil

  5. #5
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    It's not hard to use actually:
    Code:
    Sub UseRemoteExcelObject()
    '
    ' This needs a reference to Excel (here for Office 2003):
    ' Tools --> References --> Microsoft Excel 11.0 Object Library.
    '
        Dim xlapp As Excel.Application
        Set xlapp = New Excel.Application
    '
    ' It's also possible to use Late Binding.
    ' (This does not need a reference to Excel but is less efficient).
    '
    '    Dim xlApp As Object
    '    xlapp = CreateObject("Excel.Application")
    
        With xlapp
        
        ' Useful when you're debugging.
        '
            .Visible = True
        
        ' Open the Excel file.
        '
            .Workbooks.Open "C:\DocumentTemplate.xls"
        
        ' Select the proper sheet.
        '
            .Sheets("Sheet2").Select
        
        ' Select the upper-left cell (A1).
        '
            .Range("A1").Select
        
        ' Write something into it.
        '
            .Selection = "Something else"
        
        ' Save the file.
        '
            .ActiveWorkbook.SaveAs "NewDocument.xls"
        
        ' Then close it.
        '
            .Workbooks.Close
        
        ' Close Excel. !!! This is very important !!!
        ' If you do not property close the instance of Excel it will remain
        ' locked in memory with no visible interface (only Task Manager to kill it).
        '
            .Quit
        End With
        
        ' Clean up
        '
        Set xlapp = Nothing
        
    End Sub
    The advantage is that an advanced user is able to modify the template(s), for instance to change the presentation of the document, without needing to modify the Access application. Moreover, Excel (or Word) has a richest set of possibilities as far as presenting a document is concerned than what you can set up in an Access report.
    Have a nice day!

Posting Permissions

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