• Not duplicating data entry (2000)

    Author
    Topic
    #384018

    I’m trying to build a form that puts information into a single table. The information includes
    a customer number, name of requestor (which can be different at different times) title of a document, and number of copies ordered. Nice and straight-forward.

    But I would like to not be required to repeat entry of the customer number and name of requestor, as that is often the same for two or three different titles at a time, but be able to change it when I’m ready to go on to entering the next order. Since all of this data goes into the same table, I’m a little more stumped than just using a sub-form for the item list. The customer number is the only thing that associates to the rest of the database (as it is used to pick up the name and address of the school).

    Viewing 0 reply threads
    Author
    Replies
    • #657125

      A useful trick in Access is Ctrl+’ (apostrophe). This shortcut key copies the value of the active field from the previous record to the current record.

      You can also use a combo box for the customer number and requestor name. As soon as the user types in the first few characters, Access will “jump” to the first corresponding item in the dropdown list and auto-complete the entry.

      It is possible to set up a form so that it copies all or some values automatically when a new record is created.

      Finally, you could create a command button that duplicates the current record to a new record, keeping all or some values.

      If you indicate what you would like, I or other Loungers will be able to give more detailed instructions.

      • #657183

        I think the best option for this particular item would be to set up a form so that it copies all or some values automatically when a new record is created. Particularly since I can think of a a few other places where it would be really really useful.

        • #657195

          There was a thread on this subject about 9 months ago. I posted two demo databases (in Access 97 format) in post 138763 and post 139403; download one of them (I would start with tthe first one mentioned) and see if it does what you want. If it doesn’t, or if you want something else, or need more assistance, post back.

          • #657411

            Well, I thought that looked easy, but now I have a couple of questions:
            I have two forms that I would really like to do this in.

            The more straight-forward of the two is the one I mentioned earlier. I want it to copy the fields NIE and FormRequestor.
            I played with the form in the database that you sent me, and I was able to make it select only one field, but I can’t seem to make my own forms do that. I tried to look thoroughly through the properties sheets to see if there was something I missed, but I’m not spotting it.

            I also noticed that there’s an event in on Current for the form itself, does this have specific code that I would have to adjust, or could I just copy it to my own form?

            • #657416

              To use the example from the first post I mentioned in your own database, you must do the following:

              1. Import the module modAutoFillNewRecords from the demo database into your database.
              2. Put =AutoFillNewRecord([Form]) in the OnCurrent event of the form. It doesn’t need to be modified.
              3. Create a text box named AutoFillNewRecordFields on the form.
              4. If you want to duplicate *all* fields, you’re ready. But if you want to duplicate only a few fields, set the default value property of the text box to the semicolon-separated list of field names, enclosed in double quotes, for example “Last Name;First Name;SSN”

              That should do it.

    Viewing 0 reply threads
    Reply To: Not duplicating data entry (2000)

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

    Your information: