Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Nov 2001
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    editing existing records (Access 97 SR2)

    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.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: editing existing records (Access 97 SR2)

    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.

  3. #3
    Lounger
    Join Date
    Nov 2001
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: editing existing records (Access 97 SR2)

    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.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: editing existing records (Access 97 SR2)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •