Hi, i have attached my db below in zip file.
If you go to forms > jobs
There are 2 sample jobs in the db, i have a print invoice button, when you press this i am able to capture the correct invoice number in the alert but unsure how to generate the sql for the invoice (job 999 always appears regardless )
I've attached the code below, i've commented out the part which i had hoped would work but understand you cant run a SELECT from .RunSQL 
Basically, when the user clicks on the invoice button it should check to see which job is being viewed then populate that job info into the invoice report.
Can someone help please!!!
Code:
Private Sub Command14_Click()
currentInvoice = Me![Invoice Number]
MsgBox "You are opening invoice number " & currentInvoice
'DoCmd.RunSQL ("SELECT * FROM Jobs WHERE [Invoice Number]= '" & currentInvoice & "'")
DoCmd.OpenReport "Invoice", acPreview, acEdit, currentInvoice
End Sub