Table already exists Error when table box is empty

vasudevapvasudevap Member Posts: 5
Guys, I'm getting an error I cannot resolve, so any help is greatly appreciated.

DESIGN - "Repack Dashboard" Table takes in information from Production Order table and Sales Line table. It is generated when a user opens the Repack Dashboard form. The Repack Dashboard form contains a table box with Repack Dashboard info and two subforms with info from Production Order and Task Center information.

ISSUE - When filters are applied such that all data is filtered out (because nothing meets the filter criteria), the table box is empty. If the user clicks on the table box with no entries, an error pops up saying "Repack Dashboard already exists". The error is reproducible and consistent. It happens when the table box is empty. Then clicking on any of the subforms or the table box will pop up this error.

INVESTIGATION - I've run the debugger to understand when this error pops up, but the debugger doesn't catch this error at all. It runs through my code and the error pops up when the debugger is done.

If anyone has come across this issue, please point me in the right direction. Not sure if it is my design or a bug, or a property I have to set.

Answers

  • kapamaroukapamarou Member Posts: 1,152
    How do you fill the PK values?

    Have you looked at the design of Sales Order and Sales Order Subform to figure out how it works?

    If you apply filters to the Sales Order Subform you can replicate your issue there also. It's normal when you use filters.
  • vasudevapvasudevap Member Posts: 5
    i take in each line from the 'sales line' table (in a repeat statement) and add it to the corresponding column in the 'repack dashboard' table... and some fields are flow fields that the users need to sort by, so i calculate the value and copy them over.

    the sales order subform seems editable and i cannot reproduce the error... but, i will look at the design of the sales order forms.

    but, if you have any tips to prevent the error, that would be great. i don't want users getting a message box or an error box... it can get quite irritating
  • SavatageSavatage Member Posts: 7,142
    have you tried setting InsertAllowed property of the form to NO?

    Are you allowing additions in this form or is it just a form that gathers data from other places.
    if so try changing that property.
  • vasudevapvasudevap Member Posts: 5
    BRILLIANT! That worked splendidly!

    I only need this to display information, so as per your suggestion, I set the InsertAllowed to 'No', and now the error does not pop up.

    That puts an end to my agony... thank you for your responses.

    cheers,
  • SavatageSavatage Member Posts: 7,142
    Save->Compile->Enjoy :mrgreen: Glad it worked for you.
Sign In or Register to comment.