Solved

Why form won't open to a selected record

Posted on 2013-05-31
2
504 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
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…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now