Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Indiana
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VB Subform like Access (VB6 SP5)

    Is there a way to create a subform in VB similar to those used in Access. I would like to convert some existing Access Applications to VB. Any help would be greatly appreciated.

    Tom

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VB Subform like Access (VB6 SP5)

    Not really, although you can use the DataRepeater control to give you a rough equivalent of a continuous form. Nested subforms are out of the question.

    What exactly are you trying to do? It might be possible to find a custom control that would give you something like what you're looking for.
    Charlotte

  3. #3
    2 Star Lounger
    Join Date
    Nov 2001
    Location
    London, UK, England
    Posts
    116
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB Subform like Access (VB6 SP5)

    You can create 'Master' and 'Detail' forms using the Microsoft 'Data Grid' control. This would allow you to display a list of companies and all the contacts at each company, similar to Access.

    Use the 'Application Wizard' to create a new project & 'Next' through all the prompts until you get to 'Data Access Forms'. Select 'Create new Form' and provide the database format / database name. Eventually you are taken to a form where you have to specify the form layout (Master/Detail, Grid, Flexgrid etc). You will then have to provide the recordsource for the grid before it is created.

    However, this is just creating a grid with SQL - there is no sub-form object like in Access. But at least this allows you to replicate views that users are familiar with in Access.

  4. #4
    Lounger
    Join Date
    Jan 2001
    Location
    Indiana
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VB Subform like Access (VB6 SP5)

    What I'm attempting to recreate is an order form. The main form is the order details and the subform is the order items. Currently in Access I have a combobox on the subform that allows the user to select a product code. In the Before_Update event I move the information in the other columns to other fields on the item record such as description and cost. It works wonderfully in Access, but I'm trying to create an executable in VB. This is for my own benefit/education on learning VB.

    I'll look more closely at the datarepeater and see if that is going to do the job. Any other advice is always welcome.

    Thank you,
    Tom

Posting Permissions

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