Hi
Hoping to get some help on a problem I have been banging my head about.
I have 2 tables: clients_tbl and job_history_tbl
in the clients table I have the following 9 fields and the (field types);
[home_address] (text) [home_address_suburb], (text), [job_location_home] (yes or no)
[work_address] (text), [work_address_suburb] (text) , [job_location_work] (yes or no)
[other_address] (text), [other_address_suburb] (text), [job_location_other] (yes or no).
In the job history table & form, I have a field [job_address]. I need to have this field populated with one of the addresses from the Clients_TBL where the check box has been ticked.
I tried this in the SQL query but it just returns all the addresses for each record. The statement I used was
If [clients_TBL]![job_location_home] = true then
[job_history_TBL]![job_address] = [clients_TBL]![home_address] "&" [clients_TBL]![home_address_suburb]
OR
If [clients_TBL]![job_location_work] = true then
[job_history_TBL]![job_address] = [clients_TBL]![work_address] "&" [clients_TBL]![work_address_suburb]
OR
IF [clients_TBL]![job_location_other] = true then
[job_history_TBL]![job_address] = [clients_TBL]![other_address] "&" [clients_TBL]![other_address_suburb]
ELSE null
end if
I haven't used Access for a very long time and I just cant get my head around this.
I'd really appreciate some help on how to do this or even a better less muddy way...my ever declining brain cells thank you in advance
Hoping to get some help on a problem I have been banging my head about.
I have 2 tables: clients_tbl and job_history_tbl
in the clients table I have the following 9 fields and the (field types);
[home_address] (text) [home_address_suburb], (text), [job_location_home] (yes or no)
[work_address] (text), [work_address_suburb] (text) , [job_location_work] (yes or no)
[other_address] (text), [other_address_suburb] (text), [job_location_other] (yes or no).
In the job history table & form, I have a field [job_address]. I need to have this field populated with one of the addresses from the Clients_TBL where the check box has been ticked.
I tried this in the SQL query but it just returns all the addresses for each record. The statement I used was
If [clients_TBL]![job_location_home] = true then
[job_history_TBL]![job_address] = [clients_TBL]![home_address] "&" [clients_TBL]![home_address_suburb]
OR
If [clients_TBL]![job_location_work] = true then
[job_history_TBL]![job_address] = [clients_TBL]![work_address] "&" [clients_TBL]![work_address_suburb]
OR
IF [clients_TBL]![job_location_other] = true then
[job_history_TBL]![job_address] = [clients_TBL]![other_address] "&" [clients_TBL]![other_address_suburb]
ELSE null
end if
I haven't used Access for a very long time and I just cant get my head around this.
I'd really appreciate some help on how to do this or even a better less muddy way...my ever declining brain cells thank you in advance