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

How to insert a data entry inside a page (within pageframe) on runtime ?

14 views
Skip to first unread message

darren5559 via DBMonster.com

unread,
Nov 19, 2008, 5:36:19 AM11/19/08
to
hi,

i need to write a program to record down the material information within a
product, some product contains 3 materials, some contains 5 materials, number
of materials within a product is decided by user, and each material have
their own different information to record. (it's about 10 materials all
together)

To solve this problem, i prompt user the number of materials required
during data entry of new product, then i will create number of page within a
pageframe, then i will ask user the type of material for each page, from that
point, i need to insert a data entry screen (predefined form) inside the page
according to the type of material which selected by user, my question is ,
how to do that in programming ? how to insert a data entry form inside the
page on runtime ? pls advise

thanks

--
Message posted via DBMonster.com
http://www.dbmonster.com/Uwe/Forums.aspx/foxpro-oop/200809/1

Mark Burgum

unread,
Nov 19, 2008, 6:10:06 AM11/19/08
to
define your data entry form as a class within a container which is sized to
fit in your page, then the ones required.


"darren5559 via DBMonster.com" <u38358@uwe> wrote in message
news:8d6acdcac47b5@uwe...

darren5559 via DBMonster.com

unread,
Nov 19, 2008, 11:14:35 AM11/19/08
to
Mark Burgum wrote:
>define your data entry form as a class within a container which is sized to
>fit in your page, then the ones required.

is there any sample i can refer ? or maybe u can tell me what command can
insert the class into the page ? thanks in advance

>
>> hi,
>>
>[quoted text clipped - 18 lines]
>>
>> thanks

--
Message posted via DBMonster.com

http://www.dbmonster.com/Uwe/Forums.aspx/foxpro-oop/200811/1

Craig Berntson

unread,
Nov 19, 2008, 11:23:18 AM11/19/08
to
What happens if they need to add 15, 20, or 50 items? Creating that many
pages is not practical. How about a different approach....

Display a data entry form that has a "Save and Add Another" button. As long
as the user has materials to add, they keep using that button. Once they've
added the last item, they select the "Save and Close" button.

--

Craig Berntson
Microsoft MVP

-------------


"darren5559 via DBMonster.com" <u38358@uwe> wrote in message
news:8d6acdcac47b5@uwe...

Dan Freeman

unread,
Nov 19, 2008, 11:29:51 AM11/19/08
to
The origial response left out some details.

Define your data entry "forms" as *CONTAINERS*. At runtime, use the
pageframe.page's AddObject() method to add the container required for each
page. (And then set Visible, and all controlsources.)

Dan

darren5559 via DBMonster.com

unread,
Nov 19, 2008, 9:09:21 PM11/19/08
to
Dan Freeman wrote:
>The origial response left out some details.
>
>Define your data entry "forms" as *CONTAINERS*. At runtime, use the
>pageframe.page's AddObject() method to add the container required for each
>page. (And then set Visible, and all controlsources.)
>
>Dan
>
>>> define your data entry form as a class within a container which is
>>> sized to fit in your page, then the ones required.
>[quoted text clipped - 7 lines]
>>>>
>>>> thanks

Hi Dan,

really appreciate for your help, i will give it a try, thanks a lot !!!

--
Message posted via http://www.dbmonster.com

darren5559 via DBMonster.com

unread,
Nov 19, 2008, 9:14:22 PM11/19/08
to
Craig Berntson wrote:
>What happens if they need to add 15, 20, or 50 items? Creating that many
>pages is not practical. How about a different approach....
>
>Display a data entry form that has a "Save and Add Another" button. As long
>as the user has materials to add, they keep using that button. Once they've
>added the last item, they select the "Save and Close" button.
>
>> hi,
>>
>[quoted text clipped - 18 lines]
>>
>> thanks

Hi Craig Berntson,

my client is a paper box manufacturer, one paper box would never contains
more than 10 materials, so what approach u will recommend ? pls give me your
advice, thanks !

--
Message posted via DBMonster.com

http://www.dbmonster.com/Uwe/Forums.aspx/foxpro-oop/200811/1

darren5559 via DBMonster.com

unread,
Nov 19, 2008, 9:29:52 PM11/19/08
to
Dan Freeman wrote:
>The origial response left out some details.
>
>Define your data entry "forms" as *CONTAINERS*. At runtime, use the
>pageframe.page's AddObject() method to add the container required for each
>page. (And then set Visible, and all controlsources.)
>
>Dan
>
>>> define your data entry form as a class within a container which is
>>> sized to fit in your page, then the ones required.
>[quoted text clipped - 7 lines]
>>>>
>>>> thanks

Hi Dan,

i have a question. when u talk about <Define data entry "forms" as
*CONTAINERS*>, is it mean i need to insert all controls into a container
instead of a form ? pls advise , thanks

Bernhard Sander

unread,
Nov 20, 2008, 6:35:44 AM11/20/08
to
Hi darren5559,

> my client is a paper box manufacturer, one paper box would never contains
> more than 10 materials, so what approach u will recommend ? pls give me your
> advice, thanks !

It is exactly the same approach as you would do it with an invoice and its items
or an offer and its items. There you could have millions of items, but it does
not matter if your client uses only 10. And next year with this new super box he
could use 11 materials.

Regards
Bernhard Sander

Dan Freeman

unread,
Nov 20, 2008, 11:24:43 AM11/20/08
to
darren5559 via DBMonster.com wrote:
> Dan Freeman wrote:
>> The origial response left out some details.
>>
>> Define your data entry "forms" as *CONTAINERS*. At runtime, use the
>> pageframe.page's AddObject() method to add the container required
>> for each page. (And then set Visible, and all controlsources.)
>>
>> Dan
>>
>>>> define your data entry form as a class within a container which is
>>>> sized to fit in your page, then the ones required.
>> [quoted text clipped - 7 lines]
>>>>>
>>>>> thanks
>
> Hi Dan,
>
> i have a question. when u talk about <Define data entry "forms" as
> *CONTAINERS*>, is it mean i need to insert all controls into a
> container instead of a form ? pls advise , thanks

Yes, that's correct. If you put all of your controls into a container, you
only need to add one object, the container, at runtime.


Craig Berntson

unread,
Nov 20, 2008, 11:29:30 AM11/20/08
to
As soon as I hear "never", warning flags start going up. Bernhard is
correct. Next year it could be 11 or 12 or 50. My approach will work for 2
items or 10 or 1000. Just make sure you handle the situation when the user
clicks "Save and Add Another" when they really meant "Save and Close"

--

Craig Berntson
Microsoft MVP

-------------
"darren5559 via DBMonster.com" <u38358@uwe> wrote in message

news:8d72fe8aadd57@uwe...

darren5559 via DBMonster.com

unread,
Nov 20, 2008, 9:38:17 PM11/20/08
to

Hi Bernhard Sander,

i think you are right, i will use your approach, really thanks a lot !!!

0 new messages