G
Guest
My form which is based on a query called INVOICE, has two comdo boxes apart
from other fields. The first combo box named TOID when on click gets down
(lookup) data from a table call PEOPLE, which has a list of people and
another combo box named CONID, which is related, gets details from another
table called CONTRACTS which has various unit lists per person (can have
various units per person). I which that from the first combo TOID the field
choosen from this combo is transfered to the field to combo CONID which in
turn lists all the related units of the choosen PEOPLE field from the first
combo TOID.
I tried the flowing taken from The access Web:-
Private sub cbxTOID_AfterUpdate()
Dim strSQL = "Select" & Me!cbxTOID
strSQL = strSQL & "from PEOPLE"
Me!cbxCONID.RowSourceType = "Table/Query"
Me!cbxCONID.RowSource = strSQL
End Sub
Nothing happened and the combo CONID remind empty and when I click on the
combo box CONID all the units of all the people was given. When you have a
unit list of 500 this becomes imprecatable!!
Also, when I input a new TOID number the CONID returns the previous list.
Can any body help as I just cannot understand what I am doing wrong?
from other fields. The first combo box named TOID when on click gets down
(lookup) data from a table call PEOPLE, which has a list of people and
another combo box named CONID, which is related, gets details from another
table called CONTRACTS which has various unit lists per person (can have
various units per person). I which that from the first combo TOID the field
choosen from this combo is transfered to the field to combo CONID which in
turn lists all the related units of the choosen PEOPLE field from the first
combo TOID.
I tried the flowing taken from The access Web:-
Private sub cbxTOID_AfterUpdate()
Dim strSQL = "Select" & Me!cbxTOID
strSQL = strSQL & "from PEOPLE"
Me!cbxCONID.RowSourceType = "Table/Query"
Me!cbxCONID.RowSource = strSQL
End Sub
Nothing happened and the combo CONID remind empty and when I click on the
combo box CONID all the units of all the people was given. When you have a
unit list of 500 this becomes imprecatable!!
Also, when I input a new TOID number the CONID returns the previous list.
Can any body help as I just cannot understand what I am doing wrong?