Results 1 to 3 of 3
  1. #1
    ahall is offline Novice
    Windows XP Access 2003
    Join Date
    May 2009
    Posts
    2

    How to populate a field on a continuous form

    Hello everyone. My first post here but bear with me as I only started using Access about 4 months ago. I wish I would have found this place back then...



    I'm stuck and haven't been able to find an answer via google search (my normal avenue) or by searching these forums.

    I need to automatically populate a specific field in a continuous form with the results of a query. To illustrate a simplified version of what I am trying to do, let's assume that I have a query that returns the following results:

    qry_Items (Item Class = 3)
    Item ID Item Class Item Name
    ------- ---------- --------------
    1 . . . 3 . . . . .US Dollars
    2 . . . 3 . . . . .US Halves
    3 . . . 3 . . . . .US Quarters
    4 . . . 3 . . . . .US Nickels
    5 . . . 3 . . . . .US Pennies



    Let's say that I also have a table which contains the following information:

    tbl_Transactions

    Trans ID Item ID Amount
    -------- ------- -------------
    xxxxxxxx xxxxxxx xxxxxxxxxxxxx



    What I want is to have a continuous form open (with tbl_Transactions as the record source), have it create 5 new records (I already know how to count the records in a query) and enter each of the [Item ID] results from qry_Items into the [Item ID] fields of the 5 new records.

    I'm trying to hack my way through it in VB but haven't had any success so far. Any help here would be greatly appreciated. Thank you in advance and please let me know if my explanation wasn't clear enough.

  2. #2
    ahall is offline Novice
    Windows XP Access 2003
    Join Date
    May 2009
    Posts
    2
    So I've worked on this thing for hours and I finally resort to posting my question as searches had lead me to nothing. Ten minutes after I post my issue, I discover my solution. It must have just helped to simplify the problem for my post.

    Here's the answer in case anyone else has the same issue:

    Just build another query editing the join properties between qry_Items![Item ID] and tbl_Transactions![Item ID] so that the query includes ALL of the records from qry_Items and only those from tbl_Transactions that match. Build the continuous form off of the new query and voila! Just throw another field (we'll call it [Transfer ID]) into the mix and you've got an automatically populated continuous form.

    Now to figure out how to mark this post SOLVED...

    Thanks for the Forums! I'll definitely be hanging around - if not for answers, for good luck and maybe someday I'll be advanced enough with Access to help someone else out.

  3. #3
    Matrix's Avatar
    Matrix is offline Admin
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2005
    Posts
    519
    Welcome aboard and thanks for posting back. I hope you enjoy your stay here.

    Mark thread as solved.

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

Similar Threads

  1. Populate date from previous record
    By Lianes in forum Access
    Replies: 3
    Last Post: 09-19-2009, 03:42 PM
  2. Populate Combo Box
    By wes28 in forum Programming
    Replies: 1
    Last Post: 03-04-2009, 06:45 AM
  3. auto populate and table relationships
    By jmarti57 in forum Access
    Replies: 0
    Last Post: 11-09-2008, 09:50 PM
  4. Auto populate fields on a form
    By ldarley in forum Forms
    Replies: 0
    Last Post: 08-14-2008, 09:39 AM
  5. Continuous Range of Records
    By tigers in forum Access
    Replies: 0
    Last Post: 10-10-2007, 08:36 AM

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