I have a frmCustomerEntry on which customer information is entered. After completing the information, the operator presses the Check In command button on frmCustomerEntry. At this point I am trying to save the customer information so it will be available when frmCheckIn is opened.
When the check In button is clicked, I am getting a run time error 2046. The command or action โSave Recordโ isnโt available.
Private Sub Check_In_Click()
If Me.Dirty Then
If IsNull(Me.CompanyOrDepartment) Then
Me.CompanyOrDepartment.SetFocus
MsgBox “Company Name is required. Enter ‘None’ if no company name is available”, vbExclamation
Cancel = True
Exit Sub
End If
RunCommand acCmdSaveRecord
End If
DoCmd.OpenForm “frmCheckIn”, , , “RentPaidDate Between ReportBeg and ReportEnd”
DoCmd.GoToRecord acDataForm, “frmCheckIn”, acNewRec
Forms!frmCheckIn!CustomerID = Me.CustomerID
Forms!frmCheckIn![Res#] = Me.ReservationNumber
Me.ReservationNumber = Null
Forms!frmCheckIn!ResBegDte = Me.ResBegDate
Me.ResBegDate = Null
Forms!frmCheckIn!ResEndDte = Me.ResEndDate
Me.ResEndDate = Null
Forms!frmCheckIn![IATA#] = Me.IATANumber
Me.IATANumber = Null
Forms!frmCheckIn![ResID#] = Me.ResID
Me.ResID = Null
Me.CustomerStatusID = 1
End Sub
Any assistance would be greatly appreciated.
Tom Goodwin