Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2014
    Posts
    20

    Button open selected record in subform table, in new form

    Hi All,

    Thanks for all of the support. I'm trying to work through an issue, and I think I'm only missing one or two small steps.

    My Goal: Use a button to open a record that is selected in a SubForm, and within the new form allow the user to edit record information.
    Method to Create the Button and Forms: Form Creator and Command Button Wizard
    Issue: When using the Command Button Wizard, the matching fields are not recognized.

    The Steps I Took So Far:

    1. Created the "Primary Form" that has the SubForm and button.
    2. Created a "2nd Form" with a table inside and placed the button within the "2nd Form". This form will become the SubForm within the "Primary Form".
    2A. Bound Form
    2B. Bound to the query
    3. Created the "View Record Form" to view the selected record from the SubForm.
    3A. Bound Form
    3B. Bound to the Primary Table, not the query
    4. When I try to create the Command Button with the Wizard, I get to the part where it says, "Open the form and find specific data to display", and I choose this option and press "Next"
    5. An error message displays and reads, "You have chosen forms that can't be linked. You must have at least one field that can be linked on each form.



    What is confusing me:
    The query is pretty much

    Code:
    SELECT * FROM Primary_Table;
    And the Bound "View Record Form" is linked to the "Primary Table" not the query. So, all of the fields should be there, especially the Primary Key.

    Thanks,
    CoffeeMakesBrainExplode

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    Did you establish the link between the parent and the subform? It sounds like you are assuming it should be able to know what to join the two sets of data on.

  3. #3
    Join Date
    Apr 2014
    Posts
    20
    I'm interpreting "establish the link between the parent and the subform" as embedding the subform into the parent form. If that's the case, I've done that before by dragging and dropping the subform onto the parent form. Even after that, the IDs aren't recognized.

    Do I have to join the table and the query to each other prior to using the Button Wizard? I thought that the button Wizard is suppose to automatically recognize those two fields.

  4. #4
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    When you navigate on the parent form, does the child form navigate correctly?

  5. #5
    Join Date
    Apr 2014
    Posts
    20
    Hi Perceptus,

    Sorry about the lag, something else came up and I'm holding off on this one. But, I think I'll be able to accomplish this soon. I re-read what you posted, and I'll definitely have to look into making sure all of the tables are joined. The object model reference is starting to make sense and I'll have to recheck the join to make sure that it's between the correct tables. Thanks for the assist again. +rep

    Thanks!
    Funnel + Coffee = Overboard

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

Similar Threads

  1. Replies: 16
    Last Post: 02-13-2016, 10:21 AM
  2. Replies: 10
    Last Post: 03-31-2015, 12:14 PM
  3. Replies: 5
    Last Post: 06-19-2013, 08:01 AM
  4. Replies: 3
    Last Post: 09-20-2012, 11:09 AM
  5. Replies: 7
    Last Post: 05-01-2012, 11:43 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