Solved

Why form won't open to a selected record

Posted on 2013-05-31
2
531 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
2 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

792 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