Tabbed forms- Subforms- Relating

  • Thread starter krista.bourgoin
  • Start date
K

krista.bourgoin

Hi,
I will try and explain this as clearly as possible... I have a main
form with five tabs, one of the tabs has a subform, on the subform I
have a column called "Status". This subform contains details from the
Project Table, with the unique Project_ID. I also have a separate
table Project Status which relates to the Project Table by the
Project_ID. What I would like to have happen is that when you click
on "Status" another form pops up with data from the Project Status
table using the Project_ID from the subform that you just clicked on.
The problem I have is that everytime I click on the "status" link,
Access says that it can't find the subform that it's looking for. I
don't know the correct naming for the code. This is the code as I
have it now:
Private Sub Status_Click()
On Error GoTo Err_Status_Click

DoCmd.RunCommand acCmdWindowHide
DoCmd.OpenForm "Project Status"

Forms![Main Form].[Project_Estimates_Subform].Form!Project_ID =
Forms![Project Status lfb]!Project_ID

Exit_Status_Click:
Exit Sub

Err_Status_Click:
MsgBox Err.Description
Resume Exit_Status_Click
End Sub

Any help would be GREATLY appreciated. I've been trying to figure
this out and haven't a clue.
Thanks,
krista
 

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