Results 1 to 5 of 5
  1. #1
    Derrick T. Davidson is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    142

    Auto Fill

    Hi I am unsure if this is possible but if you don't ask .................



    I have a form [transactions] which is completed with basic details.

    When I complete it I have 6 or 7 other pop up forms [CatBreakTrips], [CatBreakHotels], etc. these break down the basic information into information relevant to the category so whatever the category is I open the relevant breakdown pop up.

    Here is the question when I open the pop up[s] is it possible to auto a fill/copy a [transactionId] in the pop up form, from the [transactionID] (which is the Auto Number Primary key of the transaction record) in the open transaction record?

  2. #2
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    In the Primary Form:

    Code:
    Private Sub Go2SecondaryForm_Click()
    
     If Nz(Me.transactionId,"") <> "" Then
      DoCmd.OpenForm "Secondary Form", , , , , , Me.transactionId
     Else
      MsgBox "A transactionId Must Be Entered First!"
     End If
    
    End Sub


    In the Secondary Form:

    Code:
    Private Sub Form_Load()
    
        DoCmd.GoToRecord , , acNewRec
        
        If Nz(Me.OpenArgs,"") <> "" Then
          Me.transactionId = Me.OpenArgs
        End If
    
    End Sub

    You'll need to replace Go2SecondaryForm with the actual name of your Command Button and SecondaryForm with the actual name of your second Form.

    Linq ;0)>

  3. #3
    Derrick T. Davidson is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    142
    Wow this is "NEARLY" what I wanted, when I put in the code it opens the new record and puts a new number in the [secondaryformID] (primary key).

    However on the [secondaryform] I have a [secondaryformID] (primary key) plus another entry [transactionID] (primary key of [transactionform]) which is where I wanted the ID number to show up.

    Is this possible??

  4. #4
    Derrick T. Davidson is offline Competent Performer
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    142
    Works great thank you

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Glad we could help!

    Linq ;0)>

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

Similar Threads

  1. Auto Fill
    By Scotty J in forum Forms
    Replies: 10
    Last Post: 11-21-2011, 10:08 AM
  2. Auto Fill
    By Phoenyxsgirl in forum Forms
    Replies: 28
    Last Post: 10-12-2011, 05:48 PM
  3. Auto-fill
    By sidewayzalex in forum Database Design
    Replies: 49
    Last Post: 09-14-2011, 11:12 AM
  4. can't auto fill
    By chrisrach3 in forum Access
    Replies: 7
    Last Post: 09-12-2011, 04:41 AM
  5. Auto-Fill
    By sophiecormier in forum Programming
    Replies: 3
    Last Post: 10-02-2010, 08:29 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