Problem with a continuous form

B

bruno.barral

Hello,

I am developping an application in VBA with Access, and I created a
continuous form, to display data coming from a table.

In the form, each line displays data about a project, and each line
has 4 checkboxes at the right, to allow parametrization of the
projects.

My problem is that when my form is displayed, I get logically one line
per project (and that's ok), but I also get an empty line displayed at
the end of the form (all the fields are there, but no data on them).
And moreover, when I click in one of the checkboxes next to this empty
line, another empty line is created. And again, if I click in one of
the checkboxes next to this empty line, a new one is created and so
on.

My question is : how can I manage to make the continuous form display
only the necessary lines for the existing data, but no empty lines,
with this strange behaviour ?

Thank you for any idea or hint.
¨
PS :Locking the checkboxes is not a solution, as the user needs to be
able to check them for parametrization of the corresponding project.
 
A

Allen Browne

The extra line at the end is there so you can add a new record.

You can remove it by setting the form's AllowAdditions property to Yes.
However, if you then load (or filter) the form so that it has no records,
there will be nothing to show. The Detail section will go totally blank, and
any controls in the Form Header or Form Footer may not work properly either.

More info about the form going blank:
http://allenbrowne.com/casu-20.html

More info about the other controls not working properly:
http://allenbrowne.com/bug-06.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


I am developping an application in VBA with Access, and I created a
continuous form, to display data coming from a table.

In the form, each line displays data about a project, and each line
has 4 checkboxes at the right, to allow parametrization of the
projects.

My problem is that when my form is displayed, I get logically one line
per project (and that's ok), but I also get an empty line displayed at
the end of the form (all the fields are there, but no data on them).
And moreover, when I click in one of the checkboxes next to this empty
line, another empty line is created. And again, if I click in one of
the checkboxes next to this empty line, a new one is created and so
on.

My question is : how can I manage to make the continuous form display
only the necessary lines for the existing data, but no empty lines,
with this strange behaviour ?

Thank you for any idea or hint.
¨
PS :Locking the checkboxes is not a solution, as the user needs to be
able to check them for parametrization of the corresponding project.
 
N

nartla

Thank you for your answer.

I understand my form seems to bet displayed in "Append Mode" or
something like that, but I just verified and I found the the form's
AllowAdditions property is already set to No, and I still have an
empty line at the end of the form ?
 
A

Allen Browne

If AllowAdditions is No, and the form is not being dirtied/added to
programmatically, then you must have a bad record in your table.

Open the table directly. It will have the new record at the end (which you
can't delete.) If there is another blank row there, delete it.

If that is not the case, you have not set the property correctly.
 

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