• VB Subform like Access (VB6 SP5)

    Author
    Topic
    #376924

    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

    Viewing 1 reply thread
    Author
    Replies
    • #619355

      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.

      • #619519

        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

    • #619436

      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.

    Viewing 1 reply thread
    Reply To: VB Subform like Access (VB6 SP5)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: