?
Solved

Why form won't open to a selected record

Posted on 2013-05-31
2
Medium Priority
?
556 Views
Last Modified: 2013-05-31
I have a form which the user can select a record from a combobox.  Then the following code is supposed to open the second form to the selected record.  Instead the 2nd form opens and all records are displayed.

???

Here's the code of the onclick event of the command button on the first form.

DoCmd.OpenForm "frmMatlsTransHeader", acNormal, , , acFormEdit, acWindowNormal, "[MatlsTransHeaderID]=" & Me.cboID

What am I doing wrong?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 39212027
You passing it in the wrong argument.  Should be:

DoCmd.OpenForm "frmMatlsTransHeader", acNormal, , "[MatlsTransHeaderID]=" & Me.cboID

, acFormEdit, acWindowNormal

Jim.
0
 

Author Comment

by:SteveL13
ID: 39212033
Thanks.
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question