Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    assigning a value (2003)

    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

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

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: assigning a value (2003)

    Thanks for such a speedy response.

    I will give it a try in the morning.

  4. #4
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: assigning a value (2003)

    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

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

    Re: assigning a value (2003)

    Could you post a stripped down copy of your database? See <post#=401925>post 401925</post#> for instructions.

  6. #6
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: assigning a value (2003)

    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.
    Attached Files Attached Files

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

    Re: assigning a value (2003)

    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.

  8. #8
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: assigning a value (2003)

    Thank you!

  9. #9
    3 Star Lounger
    Join Date
    Nov 2002
    Location
    South Carolina, USA
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: assigning a value (2003)

    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,

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

    Re: assigning a value (2003)

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

Posting Permissions

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