Solved

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

Posted on 2013-06-17
3
313 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
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…
Familiarize people with the process of utilizing SQL Server functions 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 Microsoft Ac…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

759 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

18 Experts available now in Live!

Get 1:1 Help Now