trouble with button displaying certain info

J

JBowler

I am having a bit of trouble making a form open with certain info displayed.

I have a form called SearchPeople. A user searches on their name and the
form displays their contact details. On the SearchPeople form there is a
subform that lists the persons projects. This is a table view and not a
form. I am trying to make a button that will allow a user to select a
Project from the table by clicking its record select area which highlights
the whole row and then open that record into the MainProjects form. Is it
possible for the button to take the ProjectID from the subform and use that
as the basis to open a form that allows me to view details of that Project
in MainProjects form?

I hope I am not being too vague or complex. The user just wants to be able
to find someone and see all their projects listed in a table (minimal info
shown) and then select that project and it is displayed in full on
MainProjects form.

I have tried using a tick box and making it work from a query that selects
only the ticked record but it stays ticked. Any help is appreciated. Many
thanks

JBowler
 
M

Max Smart

If
Forms![SearchPeople]![SearchPeopleSubform].Form.RecordsetClone.RecordCount >
0 Then
DoCmd.OpenForm "MainProject", , , "[ProjectID]=" & _
Forms![SearchPeople]![SearchPeopleSubform].Form![ProjectID]
End If
 
B

Bob

You can use the On Dbl Click event to trigger the
MainProjects form to open with the selected record from
the subform so that when the user double clicks on the
record selector, the form opens to the appropriate record.

Something like:

DoCmd.OpenForm "MainProjects", acNormal, "", "[Forms]!
[SearchPeople]![SearchPeopleSubformName]![ProjectID]=
[CorrespondingTableOrQuery]![ProjectID]"
 
B

Bob

This would be applied to the On Dbl Click event of the
subform on your SearchPeople form.
-----Original Message-----
You can use the On Dbl Click event to trigger the
MainProjects form to open with the selected record from
the subform so that when the user double clicks on the
record selector, the form opens to the appropriate record.

Something like:

DoCmd.OpenForm "MainProjects", acNormal, "", "[Forms]!
[SearchPeople]![SearchPeopleSubformName]![ProjectID]=
[CorrespondingTableOrQuery]![ProjectID]"
-----Original Message-----
I am having a bit of trouble making a form open with certain info displayed.

I have a form called SearchPeople. A user searches on their name and the
form displays their contact details. On the SearchPeople form there is a
subform that lists the persons projects. This is a table view and not a
form. I am trying to make a button that will allow a
user
to select a
Project from the table by clicking its record select
area
which highlights
the whole row and then open that record into the MainProjects form. Is it
possible for the button to take the ProjectID from the subform and use that
as the basis to open a form that allows me to view details of that Project
in MainProjects form?

I hope I am not being too vague or complex. The user
just
wants to be able
to find someone and see all their projects listed in a table (minimal info
shown) and then select that project and it is displayed in full on
MainProjects form.

I have tried using a tick box and making it work from a query that selects
only the ticked record but it stays ticked. Any help is appreciated. Many
thanks

JBowler


.
.
 

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