I have the following code below to load data to a datasheet, but every time I close the form I get a warning message asking If I want to save changes to my queries. I tried setting the warnings to off, but that didn't solve the issue.
How can I solve this issue?
Private Sub LoadAvailableTechs()
Dim pSQL As String
pSQL = "SELECT * FROM Staging_Table ORDER BY Staging_Table.Tech_Name"
Me.dataAvailabilitySubform.SourceObject = "Query.qryStagingTable"
Me.dataAvailabilitySubform.Form.RecordSource = pSQL
Me.dataAvailabilitySubform.Form.AllowEdits = True
Me.dataAvailabilitySubform.Form.AllowAdditions = False
Me.dataAvailabilitySubform.Form.AllowDeletions = False
Thanks in advance,