The following was designed in VB 6.0 but ‘translated’ back into Access 97.
How do you call a parameter query in a module so that you don’t need to re-enter each value by hand in order to re-query?
The process should hold the value, increment by one and concatenate to the other value.
I tried to include all applicable code but the keyline I seek is highlited in red.
Set rs1 = db.OpenRecordset(“Company”)
Set rs2 = db.OpenRecordset(“tbl_Final”)
sql = “select * from tbl_all where conum = ”
‘tbl_company
rs1.MoveLast
rs1.MoveFirst
ldata1count = rs1.RecordCount
rs2.MoveLast
rs2.MoveFirst
lrecCount = rs2.RecordCount
Do While Not rs1.EOF()
z = rs1.Fields(“CoNUM”)
‘rs2.RecordSource = sql & Str(z)