new record is automatically added to continuous subform... how do I stop?

R

Randall Arnold

I have a continuous subform used to enter one or more records in a
one-to-many relationship. It has 2 combo boxes (one is the first control in
the index) and 2 text boxes. When the master record is added, there is a
single new record added to the continuous subform. This is by design. I
don't want additional records after the first one to show up on the subform
until after I've filled out all values in the existing controls and pressed
an AddRecord button. However, as soon as I select a value in the first
combo box, another new record is added to the continuous subform. I have
nothing in my code to trigger this, and can't see any properties that are
doing it either. I don't want it to happen.

Any ideas?

Randall Arnold
 
A

Allen Browne

Randall, I think you are misunderstanding what Access is doing. There is a
significant difference between Access displaying the New Record row, and
actually creating a record.

Unless you instruct otherwise, Access shows the new record row at the end of
a bound form. There is no record there: it exists merely so the user has
somewhere to add a record.

When you create a new record in your main form, the subform will normally
show the new record row, even though there is no record there. If you did
programmatically add a record to the subform, you would see what appears to
be 2 rows in the subform: the record you just created, and the new record
row so the user can enter another one.

The fact that Access displays the another row when you start typing in the
subform indicates you are typing into the new row, not into an existing one
that you created programmatically. This is the normal (and desirable)
behaviour in Access, unless you want to create an interface that noone would
understand.
 
R

Randall Arnold

Actually I do understand what's going on, Allen, but I get the feeling from
your reply that I didn't communicate the issue well. FYI, if it helps, this
is an Audit record application that allows the user to enter the header for
an audit and then subsequent rows for each defect identified with that
audit.

I'm not actually trying to "create an interface that noone would
understand". In fact, I'm trying to do the opposite, and I'm mystified by
that comment. Users are currently confused. They see that as they enter
data into the first row that automatically shows up when they elect to enter
defects per the audit record, a new row suddenly appears before they are
finished. I don't want this to happen, and I don't believe it's
unreasonable to want only one available row at a time to show up in the
continuous form.

What I want to happen is this: the user starts an audit. If they identify a
single failure, they click a Fail checkbox. This activates the subform that
contains the continuous form. A single available rowset should show up for
them to enter the first defect (and it does). At this point, I want the
user to be able to fill in all 4 fields BEFORE they even see the controls
for the next row show up. In fact, I want them to press an AddRecord button
(or hit return when all 4 fields are completed) to even see another row.

I've seen this behavior in other apps so I don't believe this is a novel
interface. In fact, it makes much more sense to me than what's happening
now.

Randall Arnold
 
A

Allen Browne

Okay, but that's not how Access works.

I accept your comments that other software works differntly. My comments do
reflect a mindset that things the way Access works. A continuous form or
datasheet works just as you describe, making it clear to a user that they do
have the option to enter another record as soon as they start entering one.


If you really need it to work that way, you will have to design your own
interface that works differently from the way Access works. You will not be
able to use the continuous forms or datasheets that Access offers.
 
R

Rick Brandt

Randall said:
Okay, but I'm still confused. I see it as an Access shortcoming if I
can't at least have the option to configure it so new rows ONLY
appear when I'm ready to add data, but default to listing all rows
that currently contain data during browsing. Oh well.

Think of what the form would look line then if there were no existing rows.
 
R

Randall Arnold

Okay, but I'm still confused. I see it as an Access shortcoming if I can't
at least have the option to configure it so new rows ONLY appear when I'm
ready to add data, but default to listing all rows that currently contain
data during browsing. Oh well.

Randall
 

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