Results 1 to 4 of 4
  1. #1
    Kelsey is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    United States
    Posts
    14

    Select record?

    Hi,
    I have a subform Where you can choose InventoryID (2nd sub automatically shows records related to that InventoryID), and then select the correct PurchaseOrderDetailID.
    The 2nd sub shows only instances of that InventoryID and when you select the PurchaseOrderDetailID in the first subform, I want that record in the 2nd sub to be selected as well.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Don't understand the data structure and form setup. Do you want to provide project for analysis?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Kelsey is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Sep 2011
    Location
    United States
    Posts
    14
    I can't upload, but hopefully this makes it a little more clear...

    What happens is in sub1 you choose an InventoryID and the bottom subform pulls up a list of all the different batches of that InventoryID that we have. For example..

    Batch Qty
    2301 5
    2380 15

    In sub1, you are also required to enter in a Batch number. Default is the first one on the list, but there are special circumstances where you may need to select a different one. I have this code currently.

    Private Sub IssueQuantity_BeforeUpdate(Cancel As Integer)
    If Me.IssueQuantity > Me.Parent!FifoStock!OnHand Then
    Cancel = True
    MsgBox "Do not have enough" & vbNewLine & vbNewLine & "Field not updated", vbExclamation, "Invalid Entry"
    End If
    End Sub

    But, if you DO choose a BatchID that is not the top one, the bottom subform doesn't know that you switched ID's to the 2nd on the list. So if I typed in Batch 2380 and tried to issue 6, it would tell me that I don't have enough.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Still hard to visualize, so just a guess, but sounds like a form needs to be requeried after selection.

    Why can't upload? Make copy, remove confidential data, run Compact & Repair, zip if large (2mb zip allowed), attach to post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Change/select record source of subreports
    By TerriLynnG in forum Reports
    Replies: 2
    Last Post: 08-24-2013, 10:18 AM
  2. Select record based on values of other records
    By dchaboya in forum Queries
    Replies: 2
    Last Post: 08-11-2011, 10:41 AM
  3. on change select record?
    By hlcarlin in forum Programming
    Replies: 2
    Last Post: 07-04-2011, 09:45 AM
  4. Replies: 0
    Last Post: 10-14-2009, 02:44 AM
  5. Select a certain field of a record based on ID
    By cesarone82 in forum Access
    Replies: 3
    Last Post: 06-06-2009, 01:16 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