From: JohnE on
I have a situation in which in the header of the continous form has 2 fields
that list the warranty length (standard and max). In the continous form
there are 2 fields of the same nature that feed off warranty fields (standard
by line and max by line). But, the products in the continuous form will and
will not have the same warranty. As new product is added (and can be more
then one at a time) the line item should self populate from the warranty
fields in the header. Now, a new contract (same product) is done has new
warranty lengths. The product lead comes into the form and changes the
warranty lengths to the new contract. For any new product that shows on the
form should then be populated with the new warranty lengths. The already
existing line items should not be affected by the new warranty lengths.

My first attempt was use an isnull type but that only worked on one line
item. My next was to do a loop for the new line items (have no warranty
length listed) and populate with the new warranty length. It is the looping
that I am having difficulty with and ask for help on it. I suspect this
would be in the form open (or load) event so it is done when the user views
the information. Can someone help with the loop?

Thanks...John
From: Jeff Boyce on
John

It sounds as though you think of the underlying data as "in" the form. It
isn't. In Access, forms DISPLAY data, but tables store it.

Consider using a query to retrieve all the data, then modifying that query
to get the specific conditions you are after.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"JohnE" <JohnE(a)discussions.microsoft.com> wrote in message
news:4B053C61-7488-4E04-80EF-151C39677E2C(a)microsoft.com...
>I have a situation in which in the header of the continous form has 2
>fields
> that list the warranty length (standard and max). In the continous form
> there are 2 fields of the same nature that feed off warranty fields
> (standard
> by line and max by line). But, the products in the continuous form will
> and
> will not have the same warranty. As new product is added (and can be more
> then one at a time) the line item should self populate from the warranty
> fields in the header. Now, a new contract (same product) is done has new
> warranty lengths. The product lead comes into the form and changes the
> warranty lengths to the new contract. For any new product that shows on
> the
> form should then be populated with the new warranty lengths. The already
> existing line items should not be affected by the new warranty lengths.
>
> My first attempt was use an isnull type but that only worked on one line
> item. My next was to do a loop for the new line items (have no warranty
> length listed) and populate with the new warranty length. It is the
> looping
> that I am having difficulty with and ask for help on it. I suspect this
> would be in the form open (or load) event so it is done when the user
> views
> the information. Can someone help with the loop?
>
> Thanks...John


From: JohnE on


"Jeff Boyce" wrote:

> John
>
> It sounds as though you think of the underlying data as "in" the form. It
> isn't. In Access, forms DISPLAY data, but tables store it.
>
> Consider using a query to retrieve all the data, then modifying that query
> to get the specific conditions you are after.
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
> --
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
>
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
>
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
>
> "JohnE" <JohnE(a)discussions.microsoft.com> wrote in message
> news:4B053C61-7488-4E04-80EF-151C39677E2C(a)microsoft.com...
> >I have a situation in which in the header of the continous form has 2
> >fields
> > that list the warranty length (standard and max). In the continous form
> > there are 2 fields of the same nature that feed off warranty fields
> > (standard
> > by line and max by line). But, the products in the continuous form will
> > and
> > will not have the same warranty. As new product is added (and can be more
> > then one at a time) the line item should self populate from the warranty
> > fields in the header. Now, a new contract (same product) is done has new
> > warranty lengths. The product lead comes into the form and changes the
> > warranty lengths to the new contract. For any new product that shows on
> > the
> > form should then be populated with the new warranty lengths. The already
> > existing line items should not be affected by the new warranty lengths.
> >
> > My first attempt was use an isnull type but that only worked on one line
> > item. My next was to do a loop for the new line items (have no warranty
> > length listed) and populate with the new warranty length. It is the
> > looping
> > that I am having difficulty with and ask for help on it. I suspect this
> > would be in the form open (or load) event so it is done when the user
> > views
> > the information. Can someone help with the loop?
> >
> > Thanks...John
>
>
> .
>

I am aware of the difference but it is when the data is already displayed on
the form is when the warranty information is filled in. This entire db
structure predates me so I'm actually modifying an existing form that uses
sql2005 as the back end. So when the form opens (or loads) is when the
warranty information is completed. And depending on the part, one could be
added or a 100 could be added to the list, depends on part being manufactured
and shipped. But either way, warranty info is not added until the line item
makes the list.
From: Jeff Boyce on
"Added ..." to what? If it only goes into the form, it isn't saved.

I was attempting to point out that the data in the form had to come from
somewhere, so why not work with the data, rather than the form?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"JohnE" <JohnE(a)discussions.microsoft.com> wrote in message
news:4531D3C8-575A-41F1-86FE-43E3F0EF4AE7(a)microsoft.com...
>
>
> "Jeff Boyce" wrote:
>
>> John
>>
>> It sounds as though you think of the underlying data as "in" the form.
>> It
>> isn't. In Access, forms DISPLAY data, but tables store it.
>>
>> Consider using a query to retrieve all the data, then modifying that
>> query
>> to get the specific conditions you are after.
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Access MVP
>>
>> --
>> Disclaimer: This author may have received products and services mentioned
>> in this post. Mention and/or description of a product or service herein
>> does not constitute endorsement thereof.
>>
>> Any code or pseudocode included in this post is offered "as is", with no
>> guarantee as to suitability.
>>
>> You can thank the FTC of the USA for making this disclaimer
>> possible/necessary.
>>
>> "JohnE" <JohnE(a)discussions.microsoft.com> wrote in message
>> news:4B053C61-7488-4E04-80EF-151C39677E2C(a)microsoft.com...
>> >I have a situation in which in the header of the continous form has 2
>> >fields
>> > that list the warranty length (standard and max). In the continous
>> > form
>> > there are 2 fields of the same nature that feed off warranty fields
>> > (standard
>> > by line and max by line). But, the products in the continuous form
>> > will
>> > and
>> > will not have the same warranty. As new product is added (and can be
>> > more
>> > then one at a time) the line item should self populate from the
>> > warranty
>> > fields in the header. Now, a new contract (same product) is done has
>> > new
>> > warranty lengths. The product lead comes into the form and changes the
>> > warranty lengths to the new contract. For any new product that shows
>> > on
>> > the
>> > form should then be populated with the new warranty lengths. The
>> > already
>> > existing line items should not be affected by the new warranty lengths.
>> >
>> > My first attempt was use an isnull type but that only worked on one
>> > line
>> > item. My next was to do a loop for the new line items (have no
>> > warranty
>> > length listed) and populate with the new warranty length. It is the
>> > looping
>> > that I am having difficulty with and ask for help on it. I suspect
>> > this
>> > would be in the form open (or load) event so it is done when the user
>> > views
>> > the information. Can someone help with the loop?
>> >
>> > Thanks...John
>>
>>
>> .
>>
>
> I am aware of the difference but it is when the data is already displayed
> on
> the form is when the warranty information is filled in. This entire db
> structure predates me so I'm actually modifying an existing form that uses
> sql2005 as the back end. So when the form opens (or loads) is when the
> warranty information is completed. And depending on the part, one could
> be
> added or a 100 could be added to the list, depends on part being
> manufactured
> and shipped. But either way, warranty info is not added until the line
> item
> makes the list.


From: JohnE on
Just working it the way they all wanted it. If they do not enter the
warranty length into the 2 textboxes in the header, then neither the
appropriate standard or max length fields in the continous form get filled
in. What is entered into the 2 form fields in the header is what drives what
gets entered in the 2 columns of the continous form that are new line items
that do not have any warranty established yet, so those are empty fields.

The users here have been using the same Access db look and feel since A97
came out. The front end has grown to 35mgs that is connected to 6gig sql
server db. The users don't care about the what, where, how, or why. Just
the who is doing it and when will it be ready.
John



"Jeff Boyce" wrote:

> "Added ..." to what? If it only goes into the form, it isn't saved.
>
> I was attempting to point out that the data in the form had to come from
> somewhere, so why not work with the data, rather than the form?
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
> --
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
>
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
>
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
>
> "JohnE" <JohnE(a)discussions.microsoft.com> wrote in message
> news:4531D3C8-575A-41F1-86FE-43E3F0EF4AE7(a)microsoft.com...
> >
> >
> > "Jeff Boyce" wrote:
> >
> >> John
> >>
> >> It sounds as though you think of the underlying data as "in" the form.
> >> It
> >> isn't. In Access, forms DISPLAY data, but tables store it.
> >>
> >> Consider using a query to retrieve all the data, then modifying that
> >> query
> >> to get the specific conditions you are after.
> >>
> >> Regards
> >>
> >> Jeff Boyce
> >> Microsoft Access MVP
> >>
> >> --
> >> Disclaimer: This author may have received products and services mentioned
> >> in this post. Mention and/or description of a product or service herein
> >> does not constitute endorsement thereof.
> >>
> >> Any code or pseudocode included in this post is offered "as is", with no
> >> guarantee as to suitability.
> >>
> >> You can thank the FTC of the USA for making this disclaimer
> >> possible/necessary.
> >>
> >> "JohnE" <JohnE(a)discussions.microsoft.com> wrote in message
> >> news:4B053C61-7488-4E04-80EF-151C39677E2C(a)microsoft.com...
> >> >I have a situation in which in the header of the continous form has 2
> >> >fields
> >> > that list the warranty length (standard and max). In the continous
> >> > form
> >> > there are 2 fields of the same nature that feed off warranty fields
> >> > (standard
> >> > by line and max by line). But, the products in the continuous form
> >> > will
> >> > and
> >> > will not have the same warranty. As new product is added (and can be
> >> > more
> >> > then one at a time) the line item should self populate from the
> >> > warranty
> >> > fields in the header. Now, a new contract (same product) is done has
> >> > new
> >> > warranty lengths. The product lead comes into the form and changes the
> >> > warranty lengths to the new contract. For any new product that shows
> >> > on
> >> > the
> >> > form should then be populated with the new warranty lengths. The
> >> > already
> >> > existing line items should not be affected by the new warranty lengths.
> >> >
> >> > My first attempt was use an isnull type but that only worked on one
> >> > line
> >> > item. My next was to do a loop for the new line items (have no
> >> > warranty
> >> > length listed) and populate with the new warranty length. It is the
> >> > looping
> >> > that I am having difficulty with and ask for help on it. I suspect
> >> > this
> >> > would be in the form open (or load) event so it is done when the user
> >> > views
> >> > the information. Can someone help with the loop?
> >> >
> >> > Thanks...John
> >>
> >>
> >> .
> >>
> >
> > I am aware of the difference but it is when the data is already displayed
> > on
> > the form is when the warranty information is filled in. This entire db
> > structure predates me so I'm actually modifying an existing form that uses
> > sql2005 as the back end. So when the form opens (or loads) is when the
> > warranty information is completed. And depending on the part, one could
> > be
> > added or a 100 could be added to the list, depends on part being
> > manufactured
> > and shipped. But either way, warranty info is not added until the line
> > item
> > makes the list.
>
>
> .
>