Data linking in forms

E

Evad

How do I get all data fields in a form linked to a combo box so that when I
select a item from the combo box all or selected fields update accordingly?


Thanks
 
T

TonyT

Hi Evad,

If the form is bound to a Table(or Query), make sure the combobox has the
pirmary key as the bound column, then use the AfterUpdate event procedure;

strSQL = "SELECT * FROM SourceTbl WHERE SourceID = " & Me.myCombobox & ""
Me.RecordSource = strSQL

change SourceTbl to the name of the table (or query) the form is bound too,
and myCombobox to the name of your selection combobox.

TonyT..
 
Top