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
Solved

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

Posted on 2013-06-17
3
321 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
  • 2
3 Comments
 
LVL 49

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 49

Expert Comment

by:Gustav Brock
ID: 39255453
You are welcome!

/gustav
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

809 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