Update a field from a value selected

Dgavilanes

Registered User.
Local time
Today, 21:07
Joined
Jun 25, 2001
Messages
109
Hi All,

What will be the best approach in this case..

1.) I have a combo box with these values (name of combo bx) cbxPytble [1, 2, 23, 32, 9]


Example; When I select Pytable [1] I want to update a field called [ Position] with [Regularly Appointed Teachers] and a field called [ID_L] with the letter [A], this update should be if Effective date and completed date is not null.

example

[PyTable] - [ Id_L ] - [ Position ]
1- - - [ A ] - REGULARLY APPOINTED TEACHERS
2 - - [ B ] - FULL-TIME BASIS SUBSTITUTE
23 - -[ D ] - INSTRUCTOR ASSISTANTS
32 - -[ E ] - REGULARLY APPOINTED TEACHERS
9 - - [ C ] - INSTRUCTOR ASSISTANTS


thanks

Dennis
 
Add all fields of your table to your combo box, hiding the appropriate column(s), then when the selection is made, update your position field.

combo box row source:

SELECT * FROM YourTable'sName ORDER BY PyTable

combox box 'column widths" property: .5;0,0

On event combo box AfterUpdate:

if Me!EffectiveDate & "" <> "" AND & me!completedDate & "" <> "" then
me!ID_L = me!YourComboBoxName.column(1)
me!txtPosition = me!YourComboBoxName.column(2)
End if
 

Users who are viewing this thread

Back
Top Bottom