Access - linking to a look-up table

26/09/2013 - 05:57 por SAEED | Informe spam
I have a field in a table and it is set to a number
I have created another table (Lookup via wizard)

1 String
2 Char
3 blaa blaa


and have managed to link that field to this table
so if the user wants to choose 3 he/she knows what 3 is

Question is how do i do this via " sql command "to modify my table
so my field is no longer independant but it is linked up to a my look up table


Cheers

Preguntas similare

Leer las respuestas

#1 SAEED
26/09/2013 - 07:59 | Informe spam
On Thursday, September 26, 2013 1:57:15 PM UTC+10, SAEED wrote:
I have a field in a table and it is set to a number

I have created another table (Lookup via wizard)



1 String

2 Char

3 blaa blaa





and have managed to link that field to this table

so if the user wants to choose 3 he/she knows what 3 is



Question is how do i do this via " sql command "to modify my table

so my field is no longer independant but it is linked up to a my look up table





Cheers



In case you want to know teh solution then try


CREATE TABLE LookupParam ([Field1] NUMBER NOT NULL ,[Field2] VARCHAR(40) NOT NULL);
INSERT INTO LookupParam (Field1,Field2) VALUES ( 1,'String');
INSERT INTO LookupParam (Field1,Field2) VALUES ( 2,'Global');
INSERT INTO LookupParam (Field1,Field2) VALUES ( 3,'Literal');
INSERT INTO LookupParam (Field1,Field2) VALUES ( 4,'Who knows');
UPDATE Parameter SET ParameterType = L.Field1 FROM Parameter S join LookupParam L on S.key = L.key;

embed all this in your code after opening the table and closing it at the end
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida