Results 1 to 3 of 3

Thread: Detail Line Entry Form , Please Help !

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2000
    Posts
    57

    Post

    I am facing problem in designing a detail line entry form, I want to enable user to add as many line items he wants , but at the same time I want to show him at least 10 line items on the opening screen. I have tried using control arrays but in that too,
    I have to add the controls to the array at design time , but I don't know how many Line items the user will require, I have tried datarepeater control also but in that too I need to set data source & data member property at design time but I want to set it at runtime because my line item is not containing fields directly from any one table
    it is containing fields from two tables & that too not the fields itself i.e instead of account code I am displaying & asking for account name. So , in short I am really stuck at this point & I don't Know waht to do to get my form designed but the properties set at runtime.

    Please Please Please help me.

  2. #2
    Lively Member
    Join Date
    Dec 1999
    Location
    Karlsruhe, Germany
    Posts
    122

    Post

    You can add control array elements at runtime: Suppose you have one control named text2 with property index set to 0 on your form. Use the following code to add additional elements at runtime right under your existing control:

    Code:
    Sub AddText2Control()
    
    Static ControlCount As Long
    
    ControlCount = ControlCount + 1
        
    Load Text2(ControlCount)
    Text2(ControlCount).Top = Text2(ControlCount - 1).Top + Text2(ControlCount).Height
    Text2(ControlCount).Left = Text2(ControlCount - 1).Left
    Text2(ControlCount).Visible = True
        
    End Sub
    I hope that helps!

    Roger

  3. #3
    Lively Member
    Join Date
    Jul 1999
    Posts
    78

    Post

    Why not set up a function that returns a RecordSet object with the SQL statement that generates the Line Item Data?

    Then bind that to a datagrid control?

Posting Permissions

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



Click Here to Expand Forum to Full Width