Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OT: Continuous Forms in VB6

3 views
Skip to first unread message

Keith Gardner

unread,
Oct 5, 2004, 10:53:02 PM10/5/04
to
Greetings:

I'm converting a project from Access 2003 to VB6 (maybe) starting tomorrow
morning. I thought some experienced Access / VB developer might be willing
to tell me how to produce continuous forms in VB. Since this is OT, please
reply to me off-list. Thanks.

Keith Gardner
gard...@compvisions.com


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Albert D. Kallal

unread,
Oct 6, 2004, 12:04:12 AM10/6/04
to
"Keith Gardner" <kg...@taconic.net> wrote in message
news:Xns9579E8C76EAD...@209.25.157.130...

>
> I'm converting a project from Access 2003 to VB6 (maybe) starting tomorrow
> morning. I thought some experienced Access / VB developer might be willing
> to tell me how to produce continuous forms in VB. Since this is OT, please
> reply to me off-list. Thanks.
>
> Keith Gardner
> gard...@compvisions.com
>

Actually, this is not too off topic, since many people should be prepared,
and realize that VB don't have the same concept, nor anything much like a
continues form.

A continues form has all of the wonderful features that a regular form have.
That means the zillion data events like on-insert, before update, after
update, on current, before del confirm (this list is quite long...so I will
stop at this point). In addition to a zillion data events, each control in
the continues form can use the "format" masks available for a standard
control on a form. Further, combo boxes, and things like check boxes also
repeat on a continues form. And, even more amazing is this whole process of
creating the form is a simply drag and drop process, exactly the same
process when you create a regular form. So, setting up, and formatting each
column (be it a check box, or a combo box) takes no code. You design the
form graphically, and no code is needed to do this.

Where the continues form separates from most grid controls is that you can
actually can have MORE then one line of detail data. So, if you build two
lines of detail, then that shows over and over (most grid controls have MUCH
difficult doing this).

Here are some nice screen shots of continues forms in ms-access. In this
link, I also explain some of the possible solutions in VB.
http://www.attcanada.net/~kallal.msn/Articles/Grid.htm

The alternatives in VB are:

clone method (for control array). This can work if you need to
prompt/ask the user for a few rows of data.
Control Repeater - this is actually a attempt for the VB to emulate a
continues form. This control lets you "repeat" controls over. However, the
data binding here is painful.

listview activex - this is VERY common in VB6, there is also few data
grid controls that are useable, but again are lacking as compared to the
simple ease that you have with a continues form. There are a few in the VB6
tool box. I would consider asking for some examples in one of the vb groups.

3rd party controls:
tlist7 from Bennet tec is very nice. It takes code to load up
stuff...but you should look at the screen shots here:
http://www.bennet-tec.com/btproducts/tlist/TListScreenShots.htm

All of the above approaches tend to take a good deal of code to setup, and
further code to "fill" the grids.

I have to say, that continues forms is ms-access are one those special, rare
type features that do so much for the given amount of effort. Since a
contnues form is in fact a form with all the fearues..then there is little,
if anything else in the industry that lets you do what continues forms do
with such ease.

However, if you need real cool grid stuff, then that tlist7 guy is very very
cool....

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOO...@msn.com
http://www.attcanada.net/~kallal.msn


Brendan Reynolds

unread,
Oct 6, 2004, 7:08:32 AM10/6/04
to
None of my business, of course, but I can't help but wonder why? Isn't this
a rather strange time to be converting anything to VB6?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Keith Gardner" <kg...@taconic.net> wrote in message
news:Xns9579E8C76EAD...@209.25.157.130...

Keith Gardner

unread,
Oct 6, 2004, 10:02:34 AM10/6/04
to
"Brendan Reynolds" <brenreyn at indigo dot ie> wrote in
news:OuyDVT5q...@tk2msftngp13.phx.gbl:

> None of my business, of course, but I can't help but wonder why? Isn't
> this a rather strange time to be converting anything to VB6?
>

Hi Brendan:

VB6 has the following features that make it the ideal tool for me:

1. I own it.
2. Users of the product won't have to purchase multiple copies of MS
Access.
3. I can thread the app and use control arrays.

Keith

Keith Gardner

unread,
Oct 6, 2004, 10:18:23 AM10/6/04
to
"Albert D. Kallal" <PleaseNOOO...@msn.com> wrote in
news:#cwaNm1q...@TK2MSFTNGP09.phx.gbl:

> The alternatives in VB are:
>
> clone method (for control array). This can work if you need to
> prompt/ask the user for a few rows of data.

I thought of this, but wasn't sure how to bind data to it, and how to show
different records in the different sets of controls, not to mention moving
back and forth through the recordset.

> Control Repeater - this is actually a attempt for the VB to
> emulate a
> continues form. This control lets you "repeat" controls over. However,
> the data binding here is painful.
>
> listview activex - this is VERY common in VB6, there is also few
> data
> grid controls that are useable, but again are lacking as compared to
> the simple ease that you have with a continues form. There are a few
> in the VB6 tool box. I would consider asking for some examples in one
> of the vb groups.
>
> 3rd party controls:
> tlist7 from Bennet tec is very nice. It takes code to load up
> stuff...but you should look at the screen shots here:
> http://www.bennet-tec.com/btproducts/tlist/TListScreenShots.htm
>

Well, that's nice looking, thanks for the recommendation.

> All of the above approaches tend to take a good deal of code to setup,
> and further code to "fill" the grids.
>

As you point out in your article, the ability to add controls like buttons
to continuous forms is a great help. I don't see a way to do that with a
standard grid control.

Thanks for your reply.

Keith

Brendan Reynolds

unread,
Oct 6, 2004, 11:35:13 AM10/6/04
to
Yes, but if I was going to convert something to VB these days, I'd be
converting to VB.NET rather than VB6.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


"Keith Gardner" <kg...@taconic.net> wrote in message

news:Xns957A6626C42D...@209.25.157.130...

Albert D. Kallal

unread,
Oct 6, 2004, 2:15:42 PM10/6/04
to
"Keith Gardner" <kg...@taconic.net> wrote in message
news:Xns957A6626C42D...@209.25.157.130...

> Hi Brendan:
>

> VB6 has the following features that make it the ideal tool for me:
>

> 2. Users of the product won't have to purchase multiple copies of MS
> Access.

There is the royally free runtime and deployment system for ms-access that
creates a windows "MSI" install package. This packed ms-access application
includes the runtime, and thus the end user does not need to purchase
ms-access. There are some issues of installing this system, but it simply
installs as any other windows application. Your users do not have to know it
is ms-access.

> 3. I can thread the app and use control arrays.

Can't say I every needed to thread an application. (vb support in this area
is not that great anyway).

And, yes..ms-access does lack control arrays, but there are many
workarounds.

If you are looking to "work" withal group a controls, you can:

1) use a option group frame
This often helps, as a "set" of similar controls can behave
together - this only works for the "same" type of control (eg: a bunch of
check boxes, or radio buttons, and you only want to select ONE of the
buttons).


2) Simply use a naming scheme
This means you name the controls like
strCalDate1
strCalDate2
strCalDate3

Then, to work will the controls, you would go:

for i = 1 to 3
msgbox "value of contol " & i & " is = " & me("strCalDate" & i)
next i

So, you can use a "loop" and expression to reference a control on a
form.

3) Use the tag property of a control.
dim vCon as Variant

for each vCon in me.Contorls
if vCon.Tag = "Group1" Then
.......

With the above, you don't have to use a naming scheme, but you simply enter
a "group" name that you make up into the controls "tag" property. You then
loop through all controls and look for the same tag property. Some even
suggest at form startup you load the whole thing into a collection, and that
also works well.

4) Use a continues sub form
Very *often* a set of controls that repeats can be substituted with
a continues sub-form.


So, while you don't have control arrays, there are a good number of
workarounds. Note that the ONE main drawback of the above suggestions that
can't assign a common click event to the whole group (with a continues form,
this is not a issue, but the other 3 suggestions allow you to "work" with a
group of controls...but they DO NOT share common events as a control array
would). However, to get controls to share a common event, often you can just
type in the function name right into the properties sheet (and, if you
highlight 10 controls, and type in the event name (has to be a function),
then all 10 controls will get that event (so, once again, there are some
workarounds to get controls to share the same event.).

Also, to me, the largest problem with VB is that you don't have a great
report writer like ms-access..and that you will miss the most....

Keith Gardner

unread,
Oct 8, 2004, 1:45:19 PM10/8/04
to
"Albert D. Kallal" <PleaseNOOO...@msn.com> wrote in
news:enxzBC9q...@tk2msftngp13.phx.gbl:

> There is the royally free runtime and deployment system for ms-access
> that creates a windows "MSI" install package. This packed ms-access
> application includes the runtime, and thus the end user does not need
> to purchase ms-access. There are some issues of installing this
> system, but it simply installs as any other windows application. Your
> users do not have to know it is ms-access.
>
>> 3. I can thread the app and use control arrays.
>
> Can't say I every needed to thread an application. (vb support in this
> area is not that great anyway).
>
> And, yes..ms-access does lack control arrays, but there are many
> workarounds.

Snip
>
End Snip

> If you are looking to "work" withal group a controls, you can:

> So, while you don't have control arrays, there are a good number of
> workarounds. Note that the ONE main drawback of the above suggestions
> that can't assign a common click event to the whole group (with a
> continues form, this is not a issue, but the other 3 suggestions allow
> you to "work" with a group of controls...but they DO NOT share common
> events as a control array would). However, to get controls to share a
> common event, often you can just type in the function name right into
> the properties sheet (and, if you highlight 10 controls, and type in
> the event name (has to be a function), then all 10 controls will get
> that event (so, once again, there are some workarounds to get controls
> to share the same event.).
>
> Also, to me, the largest problem with VB is that you don't have a
> great report writer like ms-access..and that you will miss the
> most....
>

Lots of great suggestions here - thanks Albert. I had considered the
Access SDK, and I think that's the way I'll end up going.

Thanks to you, and all the others who replied to my post.

Keith


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

0 new messages