I want to make such procedure:
1.Open Table1
2.Search for the first line responding a criteria
3.Get the Data from Field1
5.Run a procedre1 with this data
6.if procedure 1=true add line to Table2
7.Go to line 1 up to the last line responding criteria
Could you please give me a syntaxis of such procedure please- espesially I doubt how to take data from certain field when I found the line needed.
I made the first part to select the firms on criteria
Public Function Addrecord(Field, Sem, Man As Variant)
Dim db As Database, qd As QueryDef, rs As Recordset
Set db = CurrentDb
Set qd = db.CreateQueryDef("Temp"
qd.sql = " SELECT Firm.[Firm number], Firm.Field FROM Firm WHERE (((Firm.Field)=" & Field & ");"
End Function
But know I don't know how to take one by one the records from and work with then (to check them with other function, to add those values to other table)
Thanks a lot
Arseniy
1.Open Table1
2.Search for the first line responding a criteria
3.Get the Data from Field1
5.Run a procedre1 with this data
6.if procedure 1=true add line to Table2
7.Go to line 1 up to the last line responding criteria
Could you please give me a syntaxis of such procedure please- espesially I doubt how to take data from certain field when I found the line needed.
I made the first part to select the firms on criteria
Public Function Addrecord(Field, Sem, Man As Variant)
Dim db As Database, qd As QueryDef, rs As Recordset
Set db = CurrentDb
Set qd = db.CreateQueryDef("Temp"
qd.sql = " SELECT Firm.[Firm number], Firm.Field FROM Firm WHERE (((Firm.Field)=" & Field & ");"
End Function
But know I don't know how to take one by one the records from and work with then (to check them with other function, to add those values to other table)
Thanks a lot
Arseniy