• assigning a value (2003)

    Author
    Topic
    #446426

    Is there a way to automatically assign a value from a previous record to the current record? I know about the ctrl +’ but is there something that would save on keystrokes. It is not a deafult value but I have to enter several records and I use the same data in some of the fields.

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1085316
      • #1085323

        Thanks for such a speedy response.

        I will give it a try in the morning.

      • #1085425

        Hans,

        I followed the example and copied the code and pasted. I can get it to worked correctly when I remove the default values….it fills in all – that ok. I would like to have it only popluate certain fields. The default values look funny. It is enclosing in ” “. Is this normal? I rarely use default values. When I create the text box, nothing happens so I must be doing something wrong.

        Thanks

        • #1085427

          Could you post a stripped down copy of your database? See post 401925 for instructions.

          • #1085490

            Ok, I played around with the code all night and some this morning and can not figure out where my problem. The form is enter data form. I want it only display the fields date in, trk, bl, lbs.

            • #1085493

              There are two problems:

              1) The combo box bound to the Trk field is named Combo28. You must either use Combo28 instead of Trk in the Default Value property of the AutoFillNewRecordFields text box, or name the combo box Trk.

              2) By default, Access adds a line

              Option Compare Database

              at the top of all modules. This line is not present in your modules, in particular in modauto_fill_new_record. As a consequence, text comparisons are case sensitive, so LB and BLS are seen as different from lb and bls. Solution: insert the line

              Option Compare Database

              at the top of the modauto_fill_new_record module.

            • #1085496

              Thank you!

            • #1085588

              Hans,
              I have another form the allows the user to select a load from a drop-down and display the record on the screen. At that point, the user will then enter an date out and bill of lading number. Alot of the loads will go out on the same date with the same bill of lading. I’m having problems getting the auto-assign code to work on this form. Is this because of the drop-down and the displaying of the record?

              Thanks,

            • #1085603

              I’d have to see the form to be able to help.

    Viewing 0 reply threads
    Reply To: assigning a value (2003)

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

    Your information: