P
Peter Stone
Novice
I had the following code on a tab page.
Private Sub lblSelectNewRecord_DblClick(Cancel As Integer)
'select a new record by double clicking on the label
DoCmd.GoToRecord , , acNewRec
Me!LocalDestinationID = Me.cboDestination
Me!fsubHousekeeping!cmdPublishUpdate.Caption = "Publish"
Me.Refresh
End Sub
When I changed to the page to a subform I changed the code to the following,
but it doesn't work.
Now I get:
Run-time error '3164':
Field cannot be updated
Run-time error '2465':
Can't find the field "fsubHousekeeping' referred to in your expression.
Private Sub lblSelectNewRecord_DblClick(Cancel As Integer)
'select a new record by double clicking on the label
DoCmd.GoToRecord , , acNewRec
Me!LocalDestinationID = Me.Parent!cboDestination (error 3164)
Me!fsubHousekeeping.Form!cmdPublishUpdate.Caption = "Publish" (error
2465)
Me.Refresh
End Sub
Thank you
Peter
I had the following code on a tab page.
Private Sub lblSelectNewRecord_DblClick(Cancel As Integer)
'select a new record by double clicking on the label
DoCmd.GoToRecord , , acNewRec
Me!LocalDestinationID = Me.cboDestination
Me!fsubHousekeeping!cmdPublishUpdate.Caption = "Publish"
Me.Refresh
End Sub
When I changed to the page to a subform I changed the code to the following,
but it doesn't work.
Now I get:
Run-time error '3164':
Field cannot be updated
Run-time error '2465':
Can't find the field "fsubHousekeeping' referred to in your expression.
Private Sub lblSelectNewRecord_DblClick(Cancel As Integer)
'select a new record by double clicking on the label
DoCmd.GoToRecord , , acNewRec
Me!LocalDestinationID = Me.Parent!cboDestination (error 3164)
Me!fsubHousekeeping.Form!cmdPublishUpdate.Caption = "Publish" (error
2465)
Me.Refresh
End Sub
Thank you
Peter