okay i will tell you step by step what i have done
i have 2 tables
one is called
tblcompany
and other is called tblemployee
in tblcompany
i got 2 fields
one is ID which is automatic and primary key
and other one is cpyname
then in tblemployee
i got 3 fields
ID which is automatic number and primary key
empname which is text
and EID which is i did lookup wizard to make relationship with ID from tblcompany (i might no idea how to set up foreign key)
then i created a blank form
and drop the fields cpyname and empname
and i changed them both dropbox.
and i put in all the control source and row source and column count a you stated.
and then i went to after update and i put in event procedure and in visual basic i put in this code
-
Private Sub cpyname_AfterUpdate()
-
With Me![Employee]
-
If IsNull(Me!company) Then
-
.RowSource = ""
-
Else
-
.RowSource = "select [empname] " & _
-
"from tblemployees " & _
-
"where [id] =" & Me!company
-
End If
-
Call .Requery
-
End With
-
End Sub
-
so what i am doing wrong and where?
i gaved as much details as i could. so i hope this helps