Uncontrollable subform records

  • Thread starter Thread starter Gitche Gumee
  • Start date Start date
G

Gitche Gumee

I have a main form with customer information.

I have a subform with order information.

If there are no records for the subform (no orders for the customer), then
the subform is invisible. If orders exist, the subform is visible.

My problem is that when I page through customer records, a new order record
is being created while the order subform is invisible. What causes this and
how can I control it?

Access 2007
 
I have SP1. I don't think the HotFix applies to me.

The visible/invisible behavior was expected. It was that a new order was
being created just by browsing the customer records.

I fixed it by setting the subform's AllowAdditions property to False, then
setting it to True to create a new order. I think it was not an Access 2007
issue, but an ID10T error.
 
Well, that's what I thought too, but I haven't figured out what it might be.
All I was doing (I think) was clicking "next record" on the main form. I'll
let you know if I find out something different.

ruralguy via AccessMonster.com said:
BTW, Access will not create a new record on its own, even with allow
additions set to YES. You must be doing something else to cause the record to
go Dirty.

Gitche said:
I have SP1. I don't think the HotFix applies to me.

The visible/invisible behavior was expected. It was that a new order was
being created just by browsing the customer records.

I fixed it by setting the subform's AllowAdditions property to False, then
setting it to True to create a new order. I think it was not an Access 2007
issue, but an ID10T error.
Have you installed Office 2007 SP1 and the HotFix?
http://support.microsoft.com/kb/960307
[quoted text clipped - 11 lines]
Access 2007
 
I suppose setting one of the fields to "" would do it. <bangs head>

ruralguy via AccessMonster.com said:
I would look in the Current event of the SubForm for some suspect code.

Gitche said:
Well, that's what I thought too, but I haven't figured out what it might be.
All I was doing (I think) was clicking "next record" on the main form. I'll
let you know if I find out something different.
BTW, Access will not create a new record on its own, even with allow
additions set to YES. You must be doing something else to cause the record to
[quoted text clipped - 14 lines]
Access 2007

--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
Back
Top