Cmd Button that updated connected excel sheet (1 Viewer)

chrisjames25

Registered User.
Local time
Today, 22:34
Joined
Dec 1, 2014
Messages
401
Hi. I have a database with an input form.

I also have an excel file that i have conneted to a qry form the database. Thisexcel file is used to connect to some label software software for printing labels.

When i complete an input on my input form i click a cmd button. What i need this cmd button to do is refresh the excel file as currently before opening the label software I have to open the excel file and refresh the data to pull the newly inputted info from access through.

Is this possible? if so what is the best way to do this?

Cheers in advance
 

Eugene-LS

Registered User.
Local time
Tomorrow, 01:34
Joined
Dec 7, 2018
Messages
481
Code:
' suppresses Excel warnings
Workbooks.Application.DisplayAlerts = False

' saves the book to a file with a DIFFERENT name
' Excel.ActiveWorkbook.SaveAs ("rl.xlsm")

' saves the book to a file with the SAME name
Excel.ActiveWorkbook.Save
 

Gasman

Enthusiastic Amateur
Local time
Today, 22:34
Joined
Sep 21, 2011
Messages
14,048
TransferSpreadsheet function?
 

chrisjames25

Registered User.
Local time
Today, 22:34
Joined
Dec 1, 2014
Messages
401
Should be able to get a solution from http://accessmvp.com/KDSnell/EXCEL_Export.htm

Why is Excel involved?
Hi. Excel is involved as the label software i am using doesnt support/recognise access databases for importing data into it. Annoying i have to go through excel but at mo company wont buy alternative label software.

This software links to thermal toshiba tec printers so need (or at least i think u do) speicalist software rather than make the labels in access reports
 

Users who are viewing this thread

Top Bottom