Continuous form + strQuery = UPDATE

O

Opal

I'm working in Access 2003 trying to
build something that will allow users to
identify employees' processes within
their groups.

With your help, I have worked through
the first part of the problem, identifying what
team each employee belongs to, now I need
to assing the process to the employee.

I have a continuous form that shows
the processes for each team. Beside
each process I have a combo box for
the user to select the employee name
associated with the process.

I used this to assign the Team number
to the employees:

HoldTLTeamID = Forms!subfrmZoneTMTeam.TLTeamID.Value

With Forms!subfrmZoneTMTeam.LstTM
For Each varItem In .ItemsSelected
strQuery = "UPDATE TMInfo " & _
"SET TLTeamID= " & HoldTLTeamID & _
" WHERE TMNumber = " & .Column(0, varItem)

CurrentDb.Execute strQuery, dbFailOnError
Next varItem
End With

Where the employees names are selected from
a list box control.

Now, how can I accomplish the same thing with a
continuous form....?

Do While Not .EOF
With Forms!subfrmZoneOrg1.txtName

strQuery = "UPDATE TMInfo " & _
"SET ProcessID= " & Forms!
subformZoneOrg1.ProcessID & _
" WHERE TMNumber = " & .Column(0, varItem)

CurrentDb.Execute strQuery, dbFailOnError

End With

Loop

although this doesn't work, I was hoping it
would demonstrate what I am trying to accomplish

Can someone point me in the right direction?
 
D

David H

Before we go further, is the field that indicates which team member a process
belongs to in the same table that provides information on the process or are
we working with two different tables?
 
O

Opal

two differnt tables.

The employee info table is called

"TMInfo"

With a ProcessID field


and the "ZoneProcess" table that
lists the processes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top