I have a very minor but annoying bug. My code grabs some information from the current record and passes it to a new record, then hides and shows some buttons and instruction labels. The strange thing is that when it is done I can't edit any fields until I click on the record selector button, which I don't even want on the form. It's an unintuitive and annoying extra click; I'm not sure exactly why it's happening and haven't found any simple operation to mimic clicking the record selector. Any ideas would be appreciated.
Code:
Private Sub cmdNewFeeNextStep_Click()
' These variables will carry the value for the type of fee into the new record
Dim varFeeDescription, varMethod As String
DoCmd.Save
varFeeDescription = Me!FeeDescription
If Len(Me.Method & vbNullString) > 0 Then
varMethod = Me!Method
End If
'The IF statements above and below tell Access to ignore the Method field if it's blank.
DoCmd.GoToRecord , frmFeeScheduleUpdate, acNewRec
Me!FeeDescription = varFeeDescription
If Len(varMethod) > 0 Then
Me!Method = varMethod
End If
' We now have a new record for the same combination of fee type and method.
' The next sections unlock fields for editing and displays or hides instruction labels and navigation buttons.
Me!FeeAmount.Locked = False
Me!FeeStartDate.Locked = False
Me!FeeAmount.SetFocus
lblInstruction1.Visible = False
lblInstruction2.Visible = False
lblInstructions4.Visible = False
FeeEndDate.Visible = False
cmdNewFeeNextStep.Visible = False
cmdQuitNoSave.Visible = False
cmdDiscontinueFee.Visible = False
lblInstruction3.Visible = True
cmdFinishNewFee.Visible = True
End Sub