Hi,
I have searched the forum and found others have had this problem but I have not been able to find a solution that will work for my situation. I have a database that I have been using for a few years and it is working great. Do to changes in business needs I redesigned the database and I am not having a problem with a subform.
The user uses the subform (datasheet view) to filter records they will be working and then will update the record on the mainform. The problem is after the user updates the information the subform will move to the top record causing them the losing their position; on the previous version of the database I did not have this problem.
I have added the code below to my mainform, but I did not think that it would cause the subform to requery to the top record.
Thank in advance
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
DoCmd.SetWarnings (False)
Dim SQL As String
SQL = "UPDATE MasterData " & _
"SET MasterData.project_name = Forms!frmMain!project_name " & _
"WHERE MasterData.circuitid = Forms!frmMain!circuitid"
DoCmd.RunSQL SQL
DoCmd.SetWarnings (True)
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
I have searched the forum and found others have had this problem but I have not been able to find a solution that will work for my situation. I have a database that I have been using for a few years and it is working great. Do to changes in business needs I redesigned the database and I am not having a problem with a subform.
The user uses the subform (datasheet view) to filter records they will be working and then will update the record on the mainform. The problem is after the user updates the information the subform will move to the top record causing them the losing their position; on the previous version of the database I did not have this problem.
I have added the code below to my mainform, but I did not think that it would cause the subform to requery to the top record.
Thank in advance
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
DoCmd.SetWarnings (False)
Dim SQL As String
SQL = "UPDATE MasterData " & _
"SET MasterData.project_name = Forms!frmMain!project_name " & _
"WHERE MasterData.circuitid = Forms!frmMain!circuitid"
DoCmd.RunSQL SQL
DoCmd.SetWarnings (True)
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70