Amongst other tables in my property maintenance database, I have the following:
Jobs: Jobs that need to be done
Job Code, Contractor, etc
Job Types: Types of Job
Job Code, Description
Contractors: List of Contractors who may be given a job
ID, Name, etc.
Contractors & Jobs: Links contractors to the type of jobs they do
ID, Job code
I have a form for entering jobs, and I’d like a dropdown list in the Contractors field that will give a list of contractors who undertake this kind of work, so that if the Job Type code is BD01, the list will give a list of Contractors who do BD01 work. As I understand it, I’ll need a query something like
Select ID code, Name
from Contractors where ID code =
(Select ID code
from Contractors & Jobs
where job code = JobsForm. Job Code)
I know this isn’t right, but my SQL’s very rusty! Can anyone help me get it right? Alternatively, I’m while I’ve never used VB for Access, I’m halfways competent at VBA for Excel. Would I be better off with a VB userform and a button?
I’m using Access 2002 & WinXP Pro
Jobs: Jobs that need to be done
Job Code, Contractor, etc
Job Types: Types of Job
Job Code, Description
Contractors: List of Contractors who may be given a job
ID, Name, etc.
Contractors & Jobs: Links contractors to the type of jobs they do
ID, Job code
I have a form for entering jobs, and I’d like a dropdown list in the Contractors field that will give a list of contractors who undertake this kind of work, so that if the Job Type code is BD01, the list will give a list of Contractors who do BD01 work. As I understand it, I’ll need a query something like
Select ID code, Name
from Contractors where ID code =
(Select ID code
from Contractors & Jobs
where job code = JobsForm. Job Code)
I know this isn’t right, but my SQL’s very rusty! Can anyone help me get it right? Alternatively, I’m while I’ve never used VB for Access, I’m halfways competent at VBA for Excel. Would I be better off with a VB userform and a button?
I’m using Access 2002 & WinXP Pro