Most of my data is stored in table 1 (CAR Data). some other stata is stored
in table2 (Non-Conformance). I also have other forms that relate in the same
way. So that when you click a button, up pops the NC number, IA number etc.
The two field will store different information but will be similar. for
example, in table1 the CAR_ID is used as a number, the CAR# have information
fromo the different forms. In the field there will be items such as NC-###,
IA-###, QMS-###, etc. This is the reason. Hope this helps you understand the
databse and can help me with the cmd buttom to do what I want.
No. It doesn't.
I can think of NO REASON WHATSOEVER to store any two fields about the car
identically in two tables.
You know what a NC number, an IA number, etc. mean. I don't. Would it be a
valid statement to say that one Car can have zero, one, *or more* records in
the Non-Conformance table? If so then you have a perfectly normal "One to
Many" relationship; the Car Data table should have a primary key (which might
be a unique VehicleID or, if you don't have that information, an Autonumber);
the NonConformance table would have its own primary key (perhaps an
autonumber) and a foreign key of the same datatype as the Cars table primary
key (Long Integer if that's an autonumber), as a link to the cars table. You
could use a Subform to fill the data in and have the primary key automatically
fill into the foreign key.
If a given Cars record can never have more than one Non-Conformace record,
then you could very well simply add fields for the nonconformance information
into the Cars table; just leave them NULL if the car is in conformance, and
only fill them in if needed.
There is still NO reason to do what you origianlly suggested: "So now when you
click on the buttin it will look at CAR_ID in table1 and input this into CARID
in table2." Or perhaps I'm still misunderstanding what you are trying to do!