Subform - display range based on "FROM" "TO" comboboxes in main fo

N

NJBrit

fairly new to forms, and have a problem:
in main form, I have FROM & TO combos for a product price file.
I want to display details (code, group, price, desc) in a subform list,
starting with code FROM in the main form, and ending with code TO.
I want the user to select FROM and TO and then click a "go" button to
populate the subform.
I can't get data in the subform - is it since all data is from one table ?
I tried using a query as the source (with a filter "> forms!prices.FROM and
< forms!.prices.TO") but I'm getting a circular reference error. I haven't
found any samples from the same table - just one to many. I'm sure this is an
easy thing to do -- can you help?
 
K

KARL DEWEY

Try this in the query criteria (do not use and quotes) --
Between [Forms]![prices]![FROM] AND [Forms]![prices]![TO]

That is provided that your main form is named 'prices' and is not the table
name.
 
N

NJBrit

Hi, Karl.
My problem is really how to get the choices selected in the FROM / TO combos
of the main form to control the recs displayed in the subform.
I'm not getting anything in the subform, and when I click on the "go"
button, my filter query kicks off in a new window - not the subform.

KARL DEWEY said:
Try this in the query criteria (do not use and quotes) --
Between [Forms]![prices]![FROM] AND [Forms]![prices]![TO]

That is provided that your main form is named 'prices' and is not the table
name.

--
Build a little, test a little.


NJBrit said:
fairly new to forms, and have a problem:
in main form, I have FROM & TO combos for a product price file.
I want to display details (code, group, price, desc) in a subform list,
starting with code FROM in the main form, and ending with code TO.
I want the user to select FROM and TO and then click a "go" button to
populate the subform.
I can't get data in the subform - is it since all data is from one table ?
I tried using a query as the source (with a filter "> forms!prices.FROM and
< forms!.prices.TO") but I'm getting a circular reference error. I haven't
found any samples from the same table - just one to many. I'm sure this is an
easy thing to do -- can you help?
 
K

KARL DEWEY

So change what you put behind the button.
--
Build a little, test a little.


NJBrit said:
Hi, Karl.
My problem is really how to get the choices selected in the FROM / TO combos
of the main form to control the recs displayed in the subform.
I'm not getting anything in the subform, and when I click on the "go"
button, my filter query kicks off in a new window - not the subform.

KARL DEWEY said:
Try this in the query criteria (do not use and quotes) --
Between [Forms]![prices]![FROM] AND [Forms]![prices]![TO]

That is provided that your main form is named 'prices' and is not the table
name.

--
Build a little, test a little.


NJBrit said:
fairly new to forms, and have a problem:
in main form, I have FROM & TO combos for a product price file.
I want to display details (code, group, price, desc) in a subform list,
starting with code FROM in the main form, and ending with code TO.
I want the user to select FROM and TO and then click a "go" button to
populate the subform.
I can't get data in the subform - is it since all data is from one table ?
I tried using a query as the source (with a filter "> forms!prices.FROM and
< forms!.prices.TO") but I'm getting a circular reference error. I haven't
found any samples from the same table - just one to many. I'm sure this is an
easy thing to do -- can you help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top