form crashes when subform is empty

CobaltSSCobaltSS Member Posts: 137
Hi,

I have a form based on a copy of table 36, and a subform based on table 37. I'd like the forms to behave like forms 42 and 46. But, when the parent record exists, and no child record exists, the form crashes. I'd rather it just show the empty child table. I've matched the properties of the two sets of forms, and outside of the AutoSplitKey property, I think the 2 sets of forms are set up identically. I'm running a 3.70 back end on a 2009 client, and SQL.

cheers,

Answers

  • SavatageSavatage Member Posts: 7,142
    What do you mean by crashes? If you hit f3 and enter does it crash then? Or when a customer # is entered? Does it crash then? Let's say you have the header & subform and the sub form has items, if you delete all the items (therfore leaving it blank) does it crash then?

    Is there any error message? Happening on all machines? Does anything show in the event log of that machine?

    You say "and outside of the AutoSplitKey property" are you saying that property isn't set?
  • CobaltSSCobaltSS Member Posts: 137
    Hi again,

    The tables are NORMALLY populated via a dataport. But I did some of the testing asked for. If I open the form, delete the data in the subform, and either move off the parent record and back to the record that had the data deleted, the form crashes. If I manuall create a parent record, and do not create any child record, when I move off the record and back onto it, the form crashes. The error message is consistent: "The Sales Header does not exist, Identification and fields: Document Type: Quote, No. = xx" where xx is the number of the Parent record that I created but has no Sales Lines. I'm also concerned about the fact it's looking for "Quote", when I've specified "Order" as pretty much the only value that can ever be in that field.

    I'm developing locally, so I can only test on my machine.

    cheers,
  • CobaltSSCobaltSS Member Posts: 137
    Solved, The "Document No." in my child table had not had it's properties updated. When I removed the Table filter condition Document Type=FIELD(Document Type) from the Table Relation property, the form behaved.

    Thanks for your time,
Sign In or Register to comment.