Johnnycat1
Programmer
I have form with a multi-page tab control on it.
All of the tabs/pages have data-sheet subforms on them.
Data on the data-sheet on the 2nd tab is a product of selections made in the data-sheet on the 1st tab.
After the user makes the selections on the 1st tab, the database runs an append query that creates the data for the data-sheet on the 2nd tab.
The problem that I have is that the data-sheet on the 2nd tab will not refresh without adding a button on the form with the following code:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
The code to run the append query to populate the data-sheet on the second tab is in the "On Click" event on the second tab.
This is the code that I use to run the append query.
Private Sub Product_Pricing_Click()
DoCmd.Echo False, ""
DoCmd.SetWarnings False
DoCmd.OpenQuery "QryBidPricingAppend", acViewNormal, acEdit
DoCmd.Echo True, ""
Me.Requery
' DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
' DoCmd.Requery Forms!BidDetail!QryBidPricingSubform
' DoCmd.Requery Forms!BidDetail!bidProductPricingSubForm
End Sub
As you can see, I have tried to requery to refresh the data on the subform but none of the methods that I use will refresh the data.
As always, I am very grateful that there are people that are much smarter than me out there. Thanks for any help that you can provide.
All of the tabs/pages have data-sheet subforms on them.
Data on the data-sheet on the 2nd tab is a product of selections made in the data-sheet on the 1st tab.
After the user makes the selections on the 1st tab, the database runs an append query that creates the data for the data-sheet on the 2nd tab.
The problem that I have is that the data-sheet on the 2nd tab will not refresh without adding a button on the form with the following code:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
The code to run the append query to populate the data-sheet on the second tab is in the "On Click" event on the second tab.
This is the code that I use to run the append query.
Private Sub Product_Pricing_Click()
DoCmd.Echo False, ""
DoCmd.SetWarnings False
DoCmd.OpenQuery "QryBidPricingAppend", acViewNormal, acEdit
DoCmd.Echo True, ""
Me.Requery
' DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
' DoCmd.Requery Forms!BidDetail!QryBidPricingSubform
' DoCmd.Requery Forms!BidDetail!bidProductPricingSubForm
End Sub
As you can see, I have tried to requery to refresh the data on the subform but none of the methods that I use will refresh the data.
As always, I am very grateful that there are people that are much smarter than me out there. Thanks for any help that you can provide.