Auto generate form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pentahari
    New Member
    • Dec 2007
    • 60

    Auto generate form

    How to generate auto form to corresponding msaccess fields using visual basic. because i will create many form to the msaccess table.
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    What version of Visual Basic are you using?

    Comment

    • pentahari
      New Member
      • Dec 2007
      • 60

      #3
      my front end package version : Visual basic 6.0

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        Um... so do you mean that you want to generate a simple form at runtime to allow the user to work with the fields in an MS Access database?

        First thing - couldn't you use Access itself as the front-end?

        As for VB6, I suspect the easiest thing would be to create a couple of control arrays (label and textbox), with only element (0). At runtime, look at the table/query and add entries to both array for each field. The label would just have the field name (or comment, or whatever you plan to display), the textbox could be (perhaps) bound to the field. Or simply used as a regular textbox and the database access done in code.

        Comment

        • pentahari
          New Member
          • Dec 2007
          • 60

          #5
          Originally posted by Killer42
          Um... so do you mean that you want to generate a simple form at runtime to allow the user to work with the fields in an MS Access database?

          First thing - couldn't you use Access itself as the front-end?

          As for VB6, I suspect the easiest thing would be to create a couple of control arrays (label and textbox), with only element (0). At runtime, look at the table/query and add entries to both array for each field. The label would just have the field name (or comment, or whatever you plan to display), the textbox could be (perhaps) bound to the field. Or simply used as a regular textbox and the database access done in code.
          Thank you for your good idea.

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #6
            Originally posted by pentahari
            Thank you for your good idea.
            You're welcome. Let us know how it works out for you.

            Comment

            Working...