Frothingslosh
Premier Pale Stale Ale
- Local time
- Today, 16:10
- Joined
- Oct 17, 2012
- Messages
- 3,276
I just got assigned a project with a tight time limit. Basically, Marketing is unhappy with the invoicing tool they already use, and instead want me to create an Access app to generate and print invoices.
In a nutshell, they export a 42 column spreadsheet from the main project tracking system, add three custom columns, and save it as an xml file. This xml file is set up to work as an Excel spreadsheet, but is not formatted to allow an import into Access using Access' built-in import functionality.
In the spreadsheet, each line is full data for invoicing for a single individual and event. Each individual can have multiple events, but the individual's ID and personal data (names, phone number, address, email) is the same across each event.
What I'm thinking of is this:
First off, as someone is manually saving this thing anyway, I'm going to get them to start saving it as an actual Excel workbook rather than the XML file.
I'm thinking that the best way to handle this data is to just do a straight Transferspreadsheet of the whole thing into a temporary table in Access itself - the issue is breaking it up afterword. I know I could just import line items alone and use the single table, but 1)Duplicating data unnecessarily drives me insane, and 2) I want to really minimize the size of the database, because they're going to get an insanely huge number of these line items over a year or so.
Anyway.
Pulling the individual's ID, name, phone, address, and email is easy enough - just group them and I'm down to one line each. Then I can just append them to a permanent table, tblInvoices or something like that. Right now, there are actually no invoice numbers generated - they just list multiple event IDs - but for linking purposes, I'm thinking I'd best add an Invoice ID field, and probably a date imported field for use in a moment, as well as date invoiced and whatever fields I may need for tracking.
The other 20 or so fields I'm taking out to become the line items are where I'm a little iffy. I'm THINKING the way to go is to use a query to pull the fields I need, and include a calculated field with a function that pulls the invoice ID from the most recently added tblInvoice entry for that specific person. Then I can append that to a permanent table, and once that's done, delete the import table. (The db will be set to compact on close to avoid these deleted tables from getting out of hand.)
So basically, is that the way to go, or am I making this unnecessarily complex? I know I have a tendency to do that from time to time.
In a nutshell, they export a 42 column spreadsheet from the main project tracking system, add three custom columns, and save it as an xml file. This xml file is set up to work as an Excel spreadsheet, but is not formatted to allow an import into Access using Access' built-in import functionality.
In the spreadsheet, each line is full data for invoicing for a single individual and event. Each individual can have multiple events, but the individual's ID and personal data (names, phone number, address, email) is the same across each event.
What I'm thinking of is this:
First off, as someone is manually saving this thing anyway, I'm going to get them to start saving it as an actual Excel workbook rather than the XML file.
I'm thinking that the best way to handle this data is to just do a straight Transferspreadsheet of the whole thing into a temporary table in Access itself - the issue is breaking it up afterword. I know I could just import line items alone and use the single table, but 1)Duplicating data unnecessarily drives me insane, and 2) I want to really minimize the size of the database, because they're going to get an insanely huge number of these line items over a year or so.
Anyway.
Pulling the individual's ID, name, phone, address, and email is easy enough - just group them and I'm down to one line each. Then I can just append them to a permanent table, tblInvoices or something like that. Right now, there are actually no invoice numbers generated - they just list multiple event IDs - but for linking purposes, I'm thinking I'd best add an Invoice ID field, and probably a date imported field for use in a moment, as well as date invoiced and whatever fields I may need for tracking.
The other 20 or so fields I'm taking out to become the line items are where I'm a little iffy. I'm THINKING the way to go is to use a query to pull the fields I need, and include a calculated field with a function that pulls the invoice ID from the most recently added tblInvoice entry for that specific person. Then I can append that to a permanent table, and once that's done, delete the import table. (The db will be set to compact on close to avoid these deleted tables from getting out of hand.)
So basically, is that the way to go, or am I making this unnecessarily complex? I know I have a tendency to do that from time to time.