problem with table+form.

redblaze

Registered User.
Local time
Today, 17:19
Joined
Jan 12, 2002
Messages
54
Basically i have 2 tables...

TeamTable: TeamID, TName, TCountry

ProductTable: ProductID, TeamID, Cost ect...

what i have so far is a form in which the user can create new products using information in the team table.
so what the user has to do is enter the teamID(Producttable) for the TName & TCountry to appear. but what i want is the user to type the TName and TCountry fields which then make the TeamID field appear. it sounds complicated but i hope it isnt. can anybody help me?:confused:
thanks for your help!
 
Create the following query:

Select TeamID, TName & "," & TCountry AS NameCountry
From TeamTable
Order by NameCountry;

Create a combo and use the above query as the rowsource. Follow the wizard and choose the option to hide the TeamID. The user will be able to choose a name and country combination and the TeamID will be saved in the ProductTable.
 
The query:
Select TeamID, TName & "," & TCountry AS NameCountry
From TeamTable
Order by NameCountry;

will not work because when the query is run, Access has no idea what NameCountry is in the Order By clause and would pup up an input box asking the user to input the value for NameCountry.


Use this:
Select TeamID, TName & ", " & TCountry AS NameCountry
From TeamTable
Order by TName & ", " & TCountry
 

Users who are viewing this thread

Back
Top Bottom