I am an old basic programmer and dont know how to deal with opening a file. I trying to understand a type of ACCESS module VB code. This is what I am trying to do.
from the query
table A.field 5
npa: qmknpa(table A.field 5)
to the module
this is what i need
table A.field 5 13-18 digits 300K in records
table B.field 2 2-6 digits 3K in records
I want to match table A.field 5 to table B.field 2 and have it look at the beggining of table A.field 5 by the lenth of table B.field 2 and match that string.
example
open table B
for x= 1 to eof
if left(table A.field 5,len(table B.field 2))= table B.field 2 then qmknpa = table B.field 2 : end next
else next
end
from the query
table A.field 5
npa: qmknpa(table A.field 5)
to the module
this is what i need
table A.field 5 13-18 digits 300K in records
table B.field 2 2-6 digits 3K in records
I want to match table A.field 5 to table B.field 2 and have it look at the beggining of table A.field 5 by the lenth of table B.field 2 and match that string.
example
open table B
for x= 1 to eof
if left(table A.field 5,len(table B.field 2))= table B.field 2 then qmknpa = table B.field 2 : end next
else next
end