Results 1 to 12 of 12
  1. #1
    thorpef1 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    7

    Automatically filling out a form

    Hey guys.
    First post, hopefully you can help me.



    I have a table full of data, and now when i go into the form to add a new row i want it to automatically see if the primary key is there and fill in the form.

    So, when i type in the account number in the field box, if there is already a row with that account number, i would like it to realise that and automatically fill out all of the other fields in the form.
    Either automatically or via a button.

    Im not a big coder, so if someone had the code or a template that would be great.



    Thanks heaps
    Last edited by thorpef1; 01-03-2010 at 09:50 PM.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Have you looked at the features of the ComboBox wizard?

  3. #3
    thorpef1 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    7
    RuralGuy.

    There are thousands of records so a combo box wouldnt be the most effective way

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Setting AutoExpand and LimitToList to YES would speed up the entire process. Use the NotInList event to move to a new record. You might be surprised how slick this would work. Select #3 from the wizard.

  5. #5
    thorpef1 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    7
    Thanks for that RG.

    Will give that a go and hopefully it works fine

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Post back to this thread if it does not work as advertised or you would like some additional assistance.

  7. #7
    thorpef1 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    7
    Had a bit of a play around and got it working just fine.

    Thanks heaps RuralGuy

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That's great! Are you ready to follow the link in my sig to mark this thread as Solved?

  9. #9
    thorpef1 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    7
    Hey RG, while i have you, can you also help me out with another quick thing:

    I want to make a form so down the bottom it shows record x of y.
    I know it already has it down the bottom but i want it a bit bigger in a label, kind of what you can put in the footer in word.

    Cheers

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    See if you can't borrow some code from Stephan Lebans' Nav Buttons.

  11. #11
    thorpef1 is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2010
    Posts
    7
    Hmmm.
    Blocked at work.
    I might have a look at home and see if i can get something.
    If not i will be back here tomorrow.

    Thanks RG

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I'll keep an eye out.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combox not filling the rest of the form
    By britt britt in forum Forms
    Replies: 2
    Last Post: 10-27-2009, 04:55 AM
  2. I want to automatically pass a value to a query
    By Slategrey252 in forum Queries
    Replies: 1
    Last Post: 10-01-2009, 05:38 AM
  3. Filling in a table via a form
    By janjan_376 in forum Forms
    Replies: 1
    Last Post: 07-06-2009, 01:57 AM
  4. Replies: 0
    Last Post: 11-10-2008, 12:32 PM
  5. Auto filling form fields
    By adamch29 in forum Forms
    Replies: 1
    Last Post: 07-25-2007, 06:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums