Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assignign Records

Status
Not open for further replies.

Chance1234

IS-IT--Management
Jul 25, 2001
7,871
US
Hi
Ive seen the answer to his somewhere befoer on this site so but cant find it, so apologies for reposting this question.

i have a table full of infomation and i need to split this equally up over a team of checkers

how can i do that ?

Chance


 
solved it with the following ]#Sub AsignRecs()
Dim Mydb As Database
Dim Myrec As Recordset
Dim Myrec2 As Recordset


Set Mydb = CurrentDb()

Set Myrec = Mydb.OpenRecordset("SELECT *FROM tblmain WHERE (((tblmain.Batch)='Population as at 10 10 ') AND ((tblmain.[New address])='empty') AND ((tblmain.[Assigned To])='empty'));")
Set Myrec2 = Mydb.OpenRecordset("SELECT * FROM tblteam")

Do Until Myrec.EOF = True


If Myrec2.EOF = True Then Myrec2.MoveFirst
Myrec.Edit
Myrec![Assigned To] = Myrec2![Name]
Myrec.Update
Myrec.MoveNext
Myrec2.MoveNext
Loop



Debug.Print "END"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top