Access Access - Opening an related form


Joined
Nov 14, 2009
Messages
4
Reaction score
0
Hello Everyone,

I have a form that needs to open a related record. Here is how it breaks down.

My first form, frmSearch_Projects, contains a Project_ID. I need the second form, 'frmSearch_Project_Details to open only the record that contains the matching Project_ID.

The tables have an established relationship. The Project_ID is the primary key on frmSearch_Projects and the foreign key on from_Search_Project_Details.

Here is what I have tried but clearly i'm wrong. I'm still teaching myself this stuff.

Private Sub Open_Details_Form_Click()
DoCmd.OpenForm frmSearch_Project_Details, , , [Project_ID] = [Form]![Project_ID],acFormEdit
End Sub

Any help is very much appreciated.

MB
 
Ad

Advertisements

Joined
Feb 17, 2010
Messages
2
Reaction score
0
i think you misses double quotes; use the help (F1) option to check that in details

ken
 
Joined
Feb 17, 2010
Messages
2
Reaction score
0
I am developing Access database for store inventory control systems. I do not know how to decrement the stock [QtyInStock] every time the store sales an item from the list.

i need a details help on this one please.

ken
 
Ad

Advertisements

Joined
Feb 25, 2010
Messages
16
Reaction score
0
This is correct syntax from a program I wrote in Access 2007:

stDocName = "frmFreeFormQuote"

stLinkCriteria = "[Quote_key]=" & Me![txtQuote_key]
DoCmd.OpenForm stDocName, , , stLinkCriteria
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top