Results 1 to 4 of 4
  1. #1
    Fairlane is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    13

    Create record in two tables

    I have several tables: tblStampOrd, tblAssets, tblComponents. This is a recording database for incoming items. Some of these items are just fine the way they are and only hit the assets table. Others have a number of components.



    I have a form based on tblStampOrd with a subform for tblAssets. Is there a way to create record on one line that hits the Assets table but also creates a blank (not Null) record in the components table so that I can create a report on Assets and sub-components? Or design the report to report Assets with no components?

    I have attatched a simple form of my DB that shows the issue. Notice that the fourth asset does not show on report at all. TIA

    Cannot get attatchment to work so I have it here:
    https://www.dropbox.com/s/jfy7r7un8sxwt3f/Sample.accdb

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Not sure the purpose of creating a "Blank" record but, you can populate a text field with an empty string and save the record using VBA. You could probably use some DoCmd.GotoRecord lines of code to get the job done. I would probably use DAO to write to the table and then Requery the subform.

  3. #3
    Fairlane is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    13
    I found a way to do it finally. Turns out that you CAN have a subform in a report and that does the trick. Just wish I could do the same in my entry forms.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by Fairlane View Post
    ...Or design the report to report Assets with no components?...
    You can use the Wizard to create a query. If you select the "Find Unmatched Records" option, you can create a query to locate companies with no records in the asset table.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-15-2013, 09:58 AM
  2. Replies: 1
    Last Post: 03-05-2013, 02:17 PM
  3. Replies: 5
    Last Post: 08-21-2012, 12:30 PM
  4. Auto Record create across tables
    By b123 in forum Database Design
    Replies: 15
    Last Post: 10-02-2010, 01:36 AM
  5. Replies: 6
    Last Post: 07-16-2010, 10:25 AM

Tags for this Thread

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