Importing Excel Spreadsheet into subform (1 Viewer)

chuckduarte

New member
Local time
Yesterday, 18:44
Joined
Feb 19, 2019
Messages
18
I'm currently working on a subform that I need to upload data from a spreadsheet. I'm getting my data from one of our work data systems that i'm able to download a spreadsheet for each project I have in my database. Each spreadsheet is unique to each of my projects. I've searched online and have not been able to find anything that uploads a spreadsheet to a subform only to new data tables or append existing. I've been able to click on a button to open the excel file but it only loads 1 record with the data i'm unable to upload a second spreadsheet. Any ideas what may be causing it. I can add my code if someone can help me out.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:44
Joined
Aug 30, 2003
Messages
36,124
What do you want to do with it? A form is just a window on data contained in a table. You'd have to import the spreadsheet to a table and base the form on that table. It could be a table that gets emptied/repopulated each time if you don't need to store the data. Another option would be to link to the spreadsheet instead of importing it, and base the form on that.
 

chuckduarte

New member
Local time
Yesterday, 18:44
Joined
Feb 19, 2019
Messages
18
Hi,

Yes I know a form is just a window to the table. I need to update the table in the subform and maintain the data and refresh the data or append with new data as necessary. I have 300 projects; and each data download from our work system db only provides a single download for each project to excel. The columns are stable as well as format. I can't just import and append to the table due to the PK and FK with the 2 tables involved.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:44
Joined
Aug 30, 2003
Messages
36,124
And the data will stay in Access once imported? Or are you looking to modify the spreadsheet? What is the other table? Presuming you want to get the 300 projects into Access, I'd be looking at a single "projects" table with an additional field to denote project. You could import to a "holding" table, massage the data, then append it to the main table.
I don't think we have enough detail about the overall goal/process to give the best answer though.
 

chuckduarte

New member
Local time
Yesterday, 18:44
Joined
Feb 19, 2019
Messages
18
I'll try to keep this simple so it doesn't confuse you so you can better understand. The data system where I get the download from provides status with completions for each Aircraft that the project is performed. As they get done completion dates are added. Periodically as needed I look up that project and download the status.

I currently have 300 project that are active but that will grow and they are already loaded in the DB. On the main project form for each project I have the subform which will show the data for each Aircraft that this project is performed or not.

I can currently add information manually to the project with completions but I prefer to have the spreadsheet uploaded to fully replace what was previously uploaded. When I get a download it gives me the status for all Aircraft not just changes.

As it is right now I was only able to upload 1 spreadsheet for the first project but It won't allow me to upload a second spreadsheet on another project. It stays blank.

I can upload a sample of the database so you can get a better understanding and review the code I have. Along with the spreadsheets. Maybe it's something simple i'm overlooking.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 18:44
Joined
Aug 30, 2003
Messages
36,124
Seeing the db and spreadsheet might help. I would think you could delete previous data for the relevant project and then import the spreadsheet data.
 

chuckduarte

New member
Local time
Yesterday, 18:44
Joined
Feb 19, 2019
Messages
18
Yes that would work removing prior then replacing with new. I'll upload a sample of the database and spreadsheets I use.
 

chuckduarte

New member
Local time
Yesterday, 18:44
Joined
Feb 19, 2019
Messages
18
ok here are the files can't seem to get it to work right. Thanks for the assistance.
 

Attachments

  • Forum Upload.zip
    1.2 MB · Views: 94

Users who are viewing this thread

Top Bottom