3 Replies Latest reply on Apr 12, 2012 6:11 AM by ahall

    Auto insert ID into imported Excel Files (monthly statements for royalty accounting)

    ahall

      Hi All

      I am a complete Newbie at this so please bear with me.

       

      I am trying to write a database where I can import monthly sales statements from various differnet sources for music sales (e.g. iTunes, Beatport etc.).

      I have only just started the database, and have two initial tables at present (Table A - overriding form, Table B - Statements).

      I have created buttons for the different sources, and written a script to import each line of an Excel spreadsheet as a new record (with multiple fields). This works fine. However I would like to identify each import by giving it a few unique codes, like Month, Year, Sales Platform etc, so that these can be referenced and dealt with later as individual 'imports'. I have created additional fields in the Statements table for these fields and also related them to fields in the original table in the relationship manager (and allowed 'add fields in target')

       

      Screen shot 2012-04-12 at 00.37.55.png

      Screen shot 2012-04-12 at 00.46.53.png

      I have written a script to try and automatically populate the fields (currently only one (Statement Month) to start with), but it keeps returing a question mark.

       

      Screen shot 2012-04-12 at 00.40.34.png

      I can't see where I am making the error.

       

      Here's the script and any help would be very gratefully received. Many thanks.

       

      Screen shot 2012-04-12 at 00.43.45.png

      Cheers Anthony