Solved

What is the vba to open a split form to a certain record?

Posted on 2013-06-17
3
328 Views
Last Modified: 2013-06-18
When a user double-clicks on a record in a subform,  I want a split form to open showing all the invoice records for that project but the top part showing the particular invoice that they clicked on. At the moment I have:

DoCmd.OpenForm "frmInvoice", , , "[ProjectID]=" & Me.ProjectID

and this opens showing all the invoices for that project but the particular invoice they want is not showing in the top part. I want to reference the top part as something like

"[InvoiceID]=" & me.InvoiceID

Thanks
0
Comment
Question by:onewheelhk
[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
3 Comments
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 39255420
You can use this as your next command:

DoCmd.SearchForRecord acDataForm , "frmInvoice", acFirst , "[InvoiceID] = " & Me!InvoiceID & ""

/gustav
0
 
LVL 1

Author Closing Comment

by:onewheelhk
ID: 39255449
Fantastic. That works great. Thanks.
0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 39255453
You are welcome!

/gustav
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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…

695 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