Hi,
I have posted several questions about this, but I think I am finaly close...
Now I am trying to link two tables, I want the program to search one table
for the user selected criteria, take all of the data in another collumn that
matches that search, and search anouther table to bring up all forms with
that information, as of right now the code will start running then ask the
user for input again, using one of the matching words from the collumn that
it is getting new data from then when data is entered there it opens all of
the forms regardless of what you put in there.
Here is the code:
Private Sub Additive_Click()
Dim stLinkCriteria As String
Dim stLinkCriteria1 As String
stLinkCriteria = "ADNAM!ADNAM = '" & Me!Additive.Value & "'"
stLinkCriteria1 = DLookup("[PRONAM]", "ADNAM", stLinkCriteria)
DoCmd.OpenForm "tblPropellant Query", , , stLinkCriteria1
End Sub
If someone could help with this that would be great,
Thanks,
James
Graham Mandeno - 12 Jul 2005 00:28 GMT
Hi James
It looks like you have two related tables - Propellants and Additives - with
a one-to-many relationship linking the ADNAM fields in the two tables.
In this case, you should base your form on a query which includes both the
tables, with a join between those two fields. Then your form can show all
the Propellants which use Additives with a particular characteristic, or
vice-versa.

Signature
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand
> Hi,
>
[quoted text clipped - 27 lines]
> Thanks,
> James
James - 12 Jul 2005 15:29 GMT
Thanks that soved the problem
-James
> Hi James
>
[quoted text clipped - 37 lines]
> > Thanks,
> > James