Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / July 2005

Tip: Looking for answers? Try searching our database.

Input Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James - 11 Jul 2005 17:19 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.