ContinuousForm Limit records

  • Thread starter Thread starter Junior
  • Start date Start date
J

Junior

I want to limit the records that appear in a continuous form to those in the
Query that is the record source
Form is set AllowEdits 'Yes' AllowAdditions, Deleteions, Dataentry 'NO'
When i open the form from the design window it displays only the records
from the query - thats what i want
however, if i open the form with VBA with the following it opens showing an
additional blank palce for a new record
Why? and how can i open the form in VBA and display only records form the
query?

DoCmd.OpenForm "frmtlkpBUS5Level", DataMode:=acFormEdit,
WindowMode:=acDialog
 
Hi Junior

The DataMode argument overrides the form's AllowXXX settings. Using
acFormEdit allows the user to edit existing records *and* add new ones.

To use the form's saved AllowXXX properties, omit the argument entirely (or
explicitly specify acFormPropertySettings, which is the default).
 
Back
Top