Tylendal1
asked on
Continuous Form in VB6 Pro
I have a form with a SQL recordsource that can produce multiple records. In Access 2003 setting the form to Continuous allows this to happen. In VB the form only displays a single record. How can I display the multiple records as is done in Access with the Form Type of Continuous?
I don't think you can natively implment continuous forms in VB6. And the ways I've seen are simulations of continuous forms, basically something like creating either static form elements or arrays of elements and, through code, setting the values of the controls. You'd do this for some number of "records" that are displayed and you'd have navigation buttons to "move" to new records, where the code actually updates the displayed form elements with new data, depending on which direction in the records set the user selected. I haven't done it myself, but I'm guessing the effort to figure this out from scratch would be comparable to finding possible solutions using newer technology. It might be worth it in the long run unless you had a hard limit of doing this in VB6.
You might be better off if you have to or choose to use vb6 to add a datagrid in your form or bind your controls to your recordset. ADO would be my preference for recordset objects...
txtObject.datafield = "[field name]"
set txtObject.DataSource = rsData
create whatever mechanism you prefer to move from one row to the next of your recordset...
then as you do the data on your form changes....
Some developers put a Data Object on the form that maintains the connection and the recordset...it has movement controls on it....
txtObject.datafield = "[field name]"
set txtObject.DataSource = rsData
create whatever mechanism you prefer to move from one row to the next of your recordset...
then as you do the data on your form changes....
Some developers put a Data Object on the form that maintains the connection and the recordset...it has movement controls on it....
ASKER
kbirecki
I'm sort of locked in to VB6 and wondering if you might point me to some sample code associated with your proposed solution.
Appreciate you help
I'm sort of locked in to VB6 and wondering if you might point me to some sample code associated with your proposed solution.
Appreciate you help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I think Brook1966 has the right idea. I've used this concept many times. The attached screenshot shows just such a form so you have a visual idea of what it could look like.
In my case, there are some selection criteria fields across the top, a grid area, and then the "form" area. The data entry in this example is done on the grid, but you could have the grid simply be a selection of a particular record and data entry is done in the "form area". You can do it either way.
SampleForm.jpg
In my case, there are some selection criteria fields across the top, a grid area, and then the "form" area. The data entry in this example is done on the grid, but you could have the grid simply be a selection of a particular record and data entry is done in the "form area". You can do it either way.
SampleForm.jpg
ASKER
Solution was correct but far more complicated for the simple need I had to display a half dozen records needing no manipulation.
Can this zone be changed to Visual Basic Programming?