How to generate auto form to corresponding msaccess fields using visual basic. because i will create many form to the msaccess table.
Auto generate form
Collapse
X
-
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
-
Thank you for your good idea.Originally posted by Killer42Um... 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
Comment