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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Existing tables via Combo Boxes

Status
Not open for further replies.

MikeMcKeown

Programmer
Apr 1, 2003
69
GB
Hi,

I have the following tables in my database:-

Practices:-
Practice Name
EmployeeID

Employee:-
Employee Name
Employee ID
Territory Number

So for example when a practice is assigned a EmployeeID they are assigned a territory. Sometimes practices will change EmployeID and hence territory.

I would was planning to have a form with the following fields, which the user would select from a dropdown list box:-

Old Employee

New Employee

The query would then go through the Practice table and change old employee to new employee, based on what the user had entered.

I have tried this ina an mdb file to some success using Forms!FormName!ComboBox. However I am unsure how to do this in an adp project, as i am not sure how update queries work.

Any ideas?
 
Basically same technique, build the SQL and execute it (say) with docmd.runSQL

A better and more efficient way to do it would be via stored procedure, but it does not sound as if your level of expertise is up to that



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
i would be interested in doing a stored procedure. I have completed a simple stored procedure for updating and deleting.

I am going to give it ago. Would I be right on assuming that I would pass in the values of the Combobox as variables to the sp.

If so how do I let the stored procedure know where the values are:-

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top