• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5748
  • Last Modified:

Command button wizard will not populate correctly in Access 2007

I have always in other versions of Microsoft Access 2007 used the Command Buttons to open other forms from the "main form."  While my buttons that are already on the main form open the new forms fine, I am having problems while creating a NEW button.  
1) I click on the button tool
2) I select Form Operations for categories and Open Form for Actions
3)  "What form would you like the command button to open?"  I select the new form which is called "Next Contact Main" (which contains a Next Contact - sub as a subform as well)
4)" Do you want the button to find specific information..."  I select the first option to open the form and find specific data.
5) "Which fields contain matching data the button can use to look up information?"
The left column shows "Main Form" and the right column shows "Next Contact Main"
Normally, both columns would be populated with the fields on the respective forms, but in this case, the left column is empty so I can not select the common field which in this case would be the "Main ID" field.  The right column which is the "Next Contact Main" form is populated fine, but the left column is completely empty so it will not let me continue with the wizard.  (I've attached a snip of the issue as a png file)

1 Solution
Jeffrey CoachmanMIS LiasonCommented:
This will happen if your Main form is Unbound.

This is because in an Unbound form, there are no real "Fields" only textboxes.
Hence there are no fields to display in the dialog box.

If there is a value you wish to join the two form on than you will have to do it through code.

The Button wizard was not meant to handle situations like this.

The code might look something like this:

Private Sub cmdOpenFormForSpecificMovie_Click()
    DoCmd.OpenForm "frmDetailVideos", , , "MovieID=" & Me.cboMovie
End Sub

Here is a sample



I am having this exact problem.  The wizard worked in Access 2003,  even if the form was unbound.
I just stumbled over this as well and the main form is bound.  It was working but now its not.  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now