Hi everyone,
I have been searching around for a solution to this problem but can't seem to find one. I have a subform containing a field (called segment_#). I have created a command button to create a new record on this form and increment the segment_# field by one (actually it assigns a value to match the record number, which is ideal). When I click, however I am getting an error saying "Method or data member not found", and the "segment_#" in my code is highlighted. Could it be that the code is trying to assign the value to "segment_#" before the record is actually created? Here's my code:
Private Sub Add_Seg_Click()
DoCmd.GoToRecord , "", acNewRec
Me.Segment_# = CurrentRecord
End Sub
Any help is greatly appreciated.
Thanks,
Ken
I have been searching around for a solution to this problem but can't seem to find one. I have a subform containing a field (called segment_#). I have created a command button to create a new record on this form and increment the segment_# field by one (actually it assigns a value to match the record number, which is ideal). When I click, however I am getting an error saying "Method or data member not found", and the "segment_#" in my code is highlighted. Could it be that the code is trying to assign the value to "segment_#" before the record is actually created? Here's my code:
Private Sub Add_Seg_Click()
DoCmd.GoToRecord , "", acNewRec
Me.Segment_# = CurrentRecord
End Sub
Any help is greatly appreciated.
Thanks,
Ken