• editing existing records (Access 97 SR2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » editing existing records (Access 97 SR2)

    Author
    Topic
    #400950

    Hi there

    We have a database for engineering change orders. We are using the switchboard to allow access to the data entry form.

    We would like to add to the switchboard something that will ask the user for the ECR number which is an autonumber auto increment field, and then open that record in the data entry form that is on the switchboard.

    Any suggestions would be greatly appreciated.

    Viewing 1 reply thread
    Author
    Replies
    • #786071

      Are you using the standard switchboard created by the Switchboard Manager? Although it is possible to customize it, I would advise against it. Instead, create a small form in which the user can enter the ECR number in a text box or combo box, or select it from a list box. Open the data entry form from this selection form, with code like

      DoCmd.OpenForm FormName:=”frmDataEntry”, WhereCondition:=”ECR=” & Me.txtECR

      The switchboard is used the standard way to open the small form. Alternatively, you can put a combo box to select the ECR on the data entry form itself – use the Combo Box Wizard to create the code for you.

      • #786081

        thanks Hans

        Err total novice user of Access here.

        Where do I put your code?

        I tried the event on change and it does not seem to do anything.

        • #786097

          No, you should put a command button cmdOK on the small form, next to or below the text box or combo box. Set the Caption property of the command button to OK, and put the code in the On Click event:

          Private Sub cmdOK_Click()
          DoCmd.OpenForm FormName:=”frmDataEntry”, WhereCondition:=”ECR=” & Me.txtECR
          End Sub

          You must replace frmDataEntry, ECR and txtECR by the actual names of the data entry form, of the ECR field and of the text box or combo box on the small form.

        • #786098

          No, you should put a command button cmdOK on the small form, next to or below the text box or combo box. Set the Caption property of the command button to OK, and put the code in the On Click event:

          Private Sub cmdOK_Click()
          DoCmd.OpenForm FormName:=”frmDataEntry”, WhereCondition:=”ECR=” & Me.txtECR
          End Sub

          You must replace frmDataEntry, ECR and txtECR by the actual names of the data entry form, of the ECR field and of the text box or combo box on the small form.

      • #786082

        thanks Hans

        Err total novice user of Access here.

        Where do I put your code?

        I tried the event on change and it does not seem to do anything.

    • #786072

      Are you using the standard switchboard created by the Switchboard Manager? Although it is possible to customize it, I would advise against it. Instead, create a small form in which the user can enter the ECR number in a text box or combo box, or select it from a list box. Open the data entry form from this selection form, with code like

      DoCmd.OpenForm FormName:=”frmDataEntry”, WhereCondition:=”ECR=” & Me.txtECR

      The switchboard is used the standard way to open the small form. Alternatively, you can put a combo box to select the ECR on the data entry form itself – use the Combo Box Wizard to create the code for you.

    Viewing 1 reply thread
    Reply To: editing existing records (Access 97 SR2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: