You could to a global Find and Replace in two steps.
First, replace "Form_" With "Forms!"
Then fix the Form Procedure declarations by converting them back.
Replace "Sub Forms!" with "Sub Form_"
I tried updating one of the procedures and I get the error message:
Run-time error '2465:
K5-Estimating can't find the field 'frmBidSubSetup' referred to in your expression.
Here is the procedure:
Public Function PrevailingWageUpdate()
'Update the Unit Price in the Resource Table to equal the Labor Rate based on the Prevailing Wage selection
If Forms!frmBid!frmBidSubSetup.Form.PrevailingWages = "Y" Then
strSQL = "UPDATE Resource INNER JOIN Labor ON Resource.ResourceID = Labor.LaborID SET Resource.RUnitPrice = [Labor].[StraightRatePU];"
CurrentDb.Execute strSQL, dbFailOnError
Else
strSQL = "UPDATE Resource INNER JOIN Labor ON Resource.ResourceID = Labor.LaborID SET Resource.RUnitPrice = [Labor].[StraightRateNP];"
CurrentDb.Execute strSQL, dbFailOnError
End If
'Since Prevailing Wage was changed, the cost in the estimate needs updated. Update ActivityResource table.
Forms!frmBid.Refresh
RecalcSetupARLaborCostAll
'Jay to do: I cant figure out how to get the BidItem costs to update on the screen. They are updated in the tables but only showing if the form is closed and re-opened.
'Forms!frmBid.Form!frmBidSummary.Requery
'Forms!frmBid.Form!frmBidSubPricingDetail.Requery
End Function
The main form = frmBid. The subform = frmBidSubSetup. It is on a tabbed control on frmBid.
On the subform there is a combobox named PrevailingWages. When the user changes PrevailingWages, AfterUpdate runs the procedure named PrevailingWageUpdate.