is it possible to write a code in vba to do the following:

tblMapping
MappingID Autonumber
Svc_code Text
Svc_descr Text
Svc_accountID Number
Svc_companyID Number

tblInvoices
InvoiceID Autonumber
Svc_companyID Number
App_number Text
App_lname Text
App_fname Text
Svc_code Text
Svc_descr Text
Svc_fee Number

take every Svc_code & svc_descr in tblInvoices, search through tblMapping

FOR COMPANYID=6
If tblinvoices.svc_descr is null
then print tblmapping.svc_accountID for all tblmapping.svc_code=tblinvoices.svc_code where tblinvoices.svc_descr is null
Else:
print tblmapping.svc_accountID for all tblmapping.svc_code=tblInvoices.svc_code AND tblmapping.svc_descr=tblinvoices.svc_descr

FOR COMPANY=4
If tblinvoices.svc_code is null
then print tblmapping.svc_accountID for all tblmapping.svc_descr=tblinvoices.svc_descr where tblinvoices.svc_code is null

FOR ALL OTHER COMPANIES
If tblmapping.svc_code=tblInvoices.svc_code
Then print tblmapping.svc_accountID



I've been trying to use SQL, but I'm just not getting it.
I think VBA has a better chance.

Any and all help would be awesome!