hi,
I am working on Project Database,
The thing I want to achieve is to have a combo with a employees name for expample and be able to pick one and automaticaly store it in table, clear the combo and do the same with another employee.
I'm getting something close with this code:
Private Sub Employee_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tblProjectEmployee")
rs.AddNew
rs![EmployeeDep] = Me.[Employee]
rs.Update
rs.Close
End Sub
I've got a strange feeling that I should use some sort of counter here, but no idea how.
The purpose behind this is to store few names under one project ID. Maybe there is another way to do this.
Any help would be great.
Cheers
I am working on Project Database,
The thing I want to achieve is to have a combo with a employees name for expample and be able to pick one and automaticaly store it in table, clear the combo and do the same with another employee.
I'm getting something close with this code:
Private Sub Employee_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("tblProjectEmployee")
rs.AddNew
rs![EmployeeDep] = Me.[Employee]
rs.Update
rs.Close
End Sub
I've got a strange feeling that I should use some sort of counter here, but no idea how.
The purpose behind this is to store few names under one project ID. Maybe there is another way to do this.
Any help would be great.
Cheers