Hi i would like when i select my button on my access form, for the file to refresh, at the moment i've got the code below to open the form, but i would like the data to be refreshed also, the data is coming from a connection to a Access database.
If at all possible i like to intergate the code into my on button click. or in the excel sheet.
Private Sub Bel_Order_report_Click()
On Error GoTo Err_Bel_Order_report_Click
Dim oApp As Object
Dim wrkFile As Object 'Workbooks
Set oApp = CreateObject("Excel.Application")
Set wrkFile = oApp.Workbooks
' Open a file.
oApp.Visible = True
'Only XL 97 supports UserControl Property
MsgBox "You've closed the Order Report." & Chr$(13) & _
"and return to the main screen."
' Close the file.
' Quit Excel.
' Close the object references.
Set wrkFile = Nothing
Set appXl = Nothing
On Error Resume Next
oApp.UserControl = True