I have a form that I need it to run a query when the form is being close, but I am running into a tad bit of trouble. First off this is my first VBA code so please bare with me! Here is what I have so far:
Public Sub Form_Close()
With DoCmd
.SetWarnings False
.OpenQuery(FixLeaseNum,acViewNormal,acAdd)
.SetWarnings True
End With
End Sub
The problem is that when I try the query it works at updating another table, but when I run it as the form is closing the form it does not update the other table. The query is an update query to bring information from another table into the main table of the form the user is using! Help!!!
Public Sub Form_Close()
With DoCmd
.SetWarnings False
.OpenQuery(FixLeaseNum,acViewNormal,acAdd)
.SetWarnings True
End With
End Sub
The problem is that when I try the query it works at updating another table, but when I run it as the form is closing the form it does not update the other table. The query is an update query to bring information from another table into the main table of the form the user is using! Help!!!