Thank you for your help, MajP. Especially, the advice to declare the variables at the top. You guessed it right; it was an Access question.
Goal: On dbl-click certain record in form's subform initiate Sub QuoteSequence.
Forms: frmQuotes - main form
sfrmQuotes - subform, in datasheet view, source: tblAllRecords (eventually I didn't use query as I had stated, I simply used the table)
txtBoxQuote - textbox where the quote will show up
In steps: Create a form "sfrmQuotes" - data source: tblAllRecords (drag over only desired columns)
Create a form "frmQuotes" - on it create subform, as source object select "sfrmQuotes", name it "sfrmQuotes"
on it create a textbox and name it "txtBoxQuote"
'applying on dbl-click event on sfrmQuote
'go into Design view
click on each textbox (not the note, the textbox) representing column and click on dbl-click event
in VBA in the top declare: Dim IDOrig As Integer (the value was a number)
Dim DocType As String
in each on dbl-click event put: IDOrig = Me.IDOrig2.Value (this will get you a value from column 'IDOrig2' and save it as IDOrig no matter which field you click)
DocType = Me.DocumentType.Value (this will get you a value from column 'DocumentType' and save it as DocType no matter which field you click)
underneath create a private Sub QuoteSequence
'for example the quote consists of only 2 strings
declare strings: Dim Str1, Str2, Quote As String
Str1 = DLookup("Name","tblAllRecords","[ID] = " & IDOrig) 'this will look up for you what value is in column 'Name' in table 'tblAllRecords' where value of column 'ID' correspond with IDOrig of selected record), Note: ID was a datatype of Number so probably Integer or Long hence the IDOrig was set up as Integer as well (I don't know if it's a must though...)
Str2 = DLookup("Subject","tblAllRecords","[ID] = " & IDOrig) 'will look up a value in column 'Subject' for selected record
Quote = Str1 & " " & Str2
Forms!frmQuotes!txtBoxQuote.Value = Quote 'the textbox was created on the main form frmQuotes therefore we have to specify exact location
End Sub
Hopefully it's comprehensible even for beginners as myself