Continious Form

  • Thread starter eschlep via AccessMonster.com
  • Start date
E

eschlep via AccessMonster.com

I am displaying records in the detail section of the form and i am trying to
use a combo box to filter them. I am also using a command button to print
the form as a report. I am have a problem getting the correct records to
show in the form view. If i have the form set to single form it only shows
one record, but when i print it to report it shows the correct records. If i
set the form to continous form it shows all of the records no matter what is
selected in the combo box, but the report prints correctly. How do i get the
form view to show the correct records according to the combo box. Thanks.
 
J

John Vinson

How do i get the
form view to show the correct records according to the combo box.

By either basing the Form on a Query which references the combo box,
or by setting the Form's Filter property to a string referencing the
combo box (and setting its FilterOn property to True).

John W. Vinson[MVP]
 
E

eschlep via AccessMonster.com

How do you base a form on a query or how do you set the forms filter property
to a string.
 
J

John Vinson

How do you base a form on a query

By selecting the Query when you create the form (rather than selecting
the table); or by viewing the Form's Properties, selecting the Data
tab, and putting the name of the query on the Record Source line (in
place of the name of the table).
or how do you set the forms filter property to a string.

Using the user interface, selecting the Records menu option and
choosing Filter; in code,

Me.Filter = "[SomeField] = " & SomeValue
Me.FilterOn = True

The Filter property should be a valid SQL WHERE clause, without the
word WHERE - I have no idea what your criteria or table structure
might be, but you can create a Query which returns the records you
want; go to SQL view; and copy and paste the WHERE clause into your
code, editing it appropriately.

John W. Vinson[MVP]
 

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