Jack,
Sorry for not being clearer at first and thanks for your patience. This
sounds exactly like what I need. I'll give it a shot and let you know how it
goes. Thanks.
David
"Jack Cannon" wrote:
> What I had assumed was that a product group would be selected on form1 and
> then that ProductGroupID would be used to open form2.
>
> What I now understand is that you want to use only one form. On that form
> you would manually enter a ProductNumber and the form would then display the
> ProductGroup associated with that ProductNumber.
>
> You can certainly do that. Set the form to "Continuous Forms" and Cycle
> "All Records". It will open and display all records. Put a text box in the
> form header. On the AfterUpdate event of the text box, use the ProductNumber
> to lookup the ProductGroupID associated with the ProductNumber. Something
> like:
>
> lngProductGroupID = Dlookup("[ProductGroupID]", "tblProducts",
> "[ProductNumber]=" & Clng(Me.MyTextBox.Value)
>
> Once you have the ProductGroupID use it to apply a filter to the form.
> Something like:
>
> Me.Filter = "[ProductGroupID]=" & lngProductGroupID
> Me.FilterOn = True
> Me.Requery
>
> If you do not want any records to appear when the form opens initially then
> on the Form_Open execute:
>
> Me.Filter = "[ProductGroupID]=0"
> Me.FilterOn = True
>
> Jack Cannon
>
> "dhstein" wrote:
>
> > Jack,
> >
> > It may be that what you're saying is exactly what I need to do and I'm
> > not getting it. Or it may be that I'm trying to do something different. I
> > don't want to show all products in a continuous form. I want a form that
> > shows the products in a product group. There will be a text box on the form
> > and when the user enters a product number in the text box he will get the
> > family of products that are in that product group. It may be 2 products or
> > it may be 20 products. But they will all show on the one screen. He can
> > change quantities for any or all of those products and then enter a different
> > value in the text box which will then show that group of products on one
> > page. This may be possible or it may not be possible and maybe what you're
> > saying is the way to do it. Sorry - I'm a little new to Access and trying to
> > figure this one out.
> >
> > "Jack Cannon" wrote:
> >
> > > It is really no different from designing any other form.
> > > Set the Default View to "Continuous Forms" and Cycle "All Records"
> > >
> > > Of course you must have some means of selecting the proper ProductGroupID
> > > then;
> > > The OpenForm command would look something like:
> > > DoCmd.OpenForm "frmProductGroup", acNormal, , "[ProductGroupID]=" &
> > > Me.ProductGroupID, acFormPropertySettings
> > >
> > > Jack Cannon
> > >
> > >
> > > "dhstein" wrote:
> > >
> > > > Jack,
> > > >
> > > > That is my question -- How to design this form ? I know this is a
> > > > complicated question - that's why I tried to explain carefully in my post
> > > > what I'm trying to do. I guess I wasn't clear enough. Thanks.
> > > >
> > > >
> > > >
> > > > "Jack Cannon" wrote:
> > > >
> > > > > This should just be a simple matter of setting the filter to the
> > > > > ProductGroupID.
> > > > > If that is not working then you need to post information of how the form is
> > > > > designed. Is it a single form displaying continuous records or is it form
> > > > > that incorporates a subform?
> > > > >
> > > > > Jack Cannon
> > > > >
> > >
|