I am trying to automate my database using MS Access. I have created a form in MS Access. I have also created an query using ODBC which imports to a spreadsheet. The name of the query is called Huawei Tickets Query.dgy. The ODBC query is an extension file called (.dgy). What I would like to do is create command button in my form that would bring in the data into the form I created. The VBA script I have so far is as follows:
Private Sub REFRESH_DATA_Click()
On Error GoTo Err_REFRESH_DATA_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Exit_REFRESH_DATA_Click:
Exit Sub
Err_REFRESH_DATA_Click:
MsgBox Err.Description
Resume Exit_REFRESH_DATA_Click
I am not sure how to script it to where my ODBC query can bring the data into my form. Any suggestions??
Private Sub REFRESH_DATA_Click()
On Error GoTo Err_REFRESH_DATA_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
Exit_REFRESH_DATA_Click:
Exit Sub
Err_REFRESH_DATA_Click:
MsgBox Err.Description
Resume Exit_REFRESH_DATA_Click
I am not sure how to script it to where my ODBC query can bring the data into my form. Any suggestions??