I have a table that has the following field names in each record.
Field name Field value
ProjectID 12345
Y1 address1
Y2 address2; address 3; address4
Y3 address6
I have a query that pulls data from this table plus pulls one field from another table that is the "primary address' for each projectID. For example, Project ID 12345 has its primary address key in field Y1 (address1) while another Project ID has its primary address key in Field Y3 (address6).
I want to reference the field name ("Y1" or "Y3") based on the primary address key from the query but I cannot figure out how to reference the field name based on the value of the primary address field.
Anyone have any suggestions?
Thanks in advance,
Bill:banghead:
Field name Field value
ProjectID 12345
Y1 address1
Y2 address2; address 3; address4
Y3 address6
I have a query that pulls data from this table plus pulls one field from another table that is the "primary address' for each projectID. For example, Project ID 12345 has its primary address key in field Y1 (address1) while another Project ID has its primary address key in Field Y3 (address6).
I want to reference the field name ("Y1" or "Y3") based on the primary address key from the query but I cannot figure out how to reference the field name based on the value of the primary address field.
Anyone have any suggestions?
Thanks in advance,
Bill:banghead: