Angus,
To use the current record as a filter for opening a second form, pass the
value to the Where parameter of the Openform method. This is most easily
done by enabling the wizard. From form design view, choose View, Toolbox,
then toggle on the button with the wand and stars. Then place a command
button, and the wizard will guide you through. Select the form, choose "Open
With Selected Data", and identify the controls on each form that have the
matching data. The wizard will generate code similar to this:
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "YourSecondForm"
stLinkCriteria = "[FieldOn2ndForm]=" & Me![ControlOn1stForm]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Hope that helps.
Sprinks
"Angus Comber" wrote:
> Hello
>
> I want to display just one row from a table.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13676
>
> Eg: SELECT * FROM Table1 WHERE xyzID = SomeValue
>
> I can do it all in code but am hoping because it is Access I can maybe do it
> with limited code?
>
> Eg on one form I have the SomeValue - want to then in OnClick Event pass
> SomeValue to say a query to get data for form?
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13676
>
> Hope I am explaining myself ok.
>
> How do I do that?
>
> Form will be standard fields - eg text fields displaying row data.
>
> Angus
>
>
>