G
Guest
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
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