>The main table is called "proyect"
>"proyect" has the field "number" as the key field
>"number" is used to identify the number of the proyect....
>
>but the thing is that Now There are different types of proyect, There could be...
>
>PS, RC, RDC, RCONC proyects,
>
>for example: PS 0001, or RC 0001, "they can have the same number but different types of proyect"
>PS = Type_P = type of proyect
>0001 = number = number of the proyect
>
>So I made a new field in the table called "Type_P" to put all of these.
>So in the form i can select in a combo box what kind of proyect I am doing, and then add the number.
>
>I also made a table to store the different kinds of proyects so I can relate them in the main table.
>
>
>What I want to do is query a specific Proyect, but I would have to query or search for example if i want to query PS 0001, or PS 0004, or RC 0001
>
>I have to tell the search... to search Proyect type PS and has the number 0001 for example.Then it seems that either:
m.Type_P = "PS"
m.Number = "0001"
If Seek(m.Type_P + m.Number)
Else
Endif
or for example if you have separate index tags,
this is also Rushmore optimizable:
Select * from Proyect ;
where Type_P = m.Type_P ;
and Number = m.Number ;
Into cursor ResultSet
would do the trick.
HTH