From: Phil H on
Hi,
I have a job list form with basic info on it. I want to be able to click on
the job number text box which then opens up a more detailed form and applies
a filter so that I only get the record for the job number that I have clicked
on from the underlaying form.

Could someone please tell me how to do this as I am guessing it should be
fairly simple although I can't figure it out.

Thanks in advance
From: Jeanette Cunningham on
Dim strWhere As String
strWhere = "[JobNumber] = " & Me.[JobNumber]
Debug.Print strWhere 'for testing only
DoCmd.OpenForm "NameOfForm", , , strWhere


Note:
If the job number field is a number data type, the code above will work.
If the job number field is a text data type, use this instead:
strWhere = "[JobNumber] = """ & Me.[JobNumber] & """"
Replace [JobNumber] with the name of the job number field

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"Phil H" <PhilH(a)discussions.microsoft.com> wrote in message
news:53A01E93-E40F-4599-863A-1A8604200EB1(a)microsoft.com...
> Hi,
> I have a job list form with basic info on it. I want to be able to click
> on
> the job number text box which then opens up a more detailed form and
> applies
> a filter so that I only get the record for the job number that I have
> clicked
> on from the underlaying form.
>
> Could someone please tell me how to do this as I am guessing it should be
> fairly simple although I can't figure it out.
>
> Thanks in advance