Results 1 to 7 of 7
  1. #1
    KevinCollins is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    6

    Auto Populate a text box in a continuous form

    I apologize if this is an elementary task but i'm failry new to access. I have a form that lists a series of line items on a purchase order, that I've been able to adequetly display using a continuous form.

    I would like to allow the user to add a record at the bottom (which I believe I've accomplished). But I would like to auto populate a description field on the OnExit event of a part number.

    Ie. The user types in the part number and tabs over to the description, and the field auto populates from a part number / description table.



    Do you accomplish this from a second query or a dlookup method?

    Thanks for the help in advance.

  2. #2
    KevinCollins is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    6
    I have to add that for better or worse i've programmed the pages using macros, not vba.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    If you want to include the field "Description" on your form, you will need to first include it in your form's recordset. If your form is bound to a query, be sure to add "Description" to the query. From here, it will be available to add to the form from the "Add Existing Fields" window.

  4. #4
    KevinCollins is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    6
    The field is already on the Form. The form is bound to a table called PoLineItems.

    I would like to do a lookup on a different Table to pull in the description from a part number that is linked in. Both part number and field are in both tables.

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    It sounds to me as though you need to add the part number / description table to the forms query and then add the description field to the query, which is what I think ItsMe was suggesting in post #3
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    On your form, in an unbound textbox place the following... you will need to include your field, control, form names in the code provided.

    Code:
    = DLookup("[FieldDescription]", "tblOtherTable", "[PartNumID] =" _
         & Forms![frmFormName]!PartNumID_on_the_Form)

  7. #7
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows XP Access 2003
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Bob Fitz View Post
    It sounds to me as though you need to add the part number / description table to the forms query and then add the description field to the query, which is what I think ItsMe was suggesting in post #3
    I agree....

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

Similar Threads

  1. Auto populate text from date
    By losingmymind in forum Access
    Replies: 4
    Last Post: 05-30-2013, 10:39 AM
  2. Replies: 11
    Last Post: 01-25-2013, 12:03 PM
  3. Replies: 1
    Last Post: 01-16-2013, 03:32 PM
  4. Replies: 5
    Last Post: 03-07-2012, 12:57 PM
  5. Replies: 2
    Last Post: 05-22-2009, 01:07 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