R
RoMi
Hi everyone,
On a form frmProba there are two unbounded combos: cboSifOO and cboSifOsoba
(just for this example here).
cboSifOO selects one of the departments from a table tblSifOO (text like
1.3.). Depending on this value the second combo selects the people from this
department only (this is a text, too). This new value would be transferred
into one field in a table tblTrening which is opened on a subform. This
means that the cboSifOsoba must be related to the tblTrening later.
Unfortunately I do not see what is missing in these few lines of code and I
can't continue further more.
The problem is in my improper syntax in WHERE clause. If I write down
something like .WHERE tblOsKarton.SifOO LIKE "1.3."; then cboSifOsoba shows
just what I need (selected persons).
Problematical code is .
Private Sub cboSifOO_AfterUpdate()
..
Me.cboSifOsoba.RowSource = "SELECT tblOsKarton.SifOsoba,
tblOsKarton.Prezime FROM tblOsKarton WHERE (((tblOsKarton.SifOO) =
Forms!frmProba!cboSifOO));"
..
End Sub
Do you see a catch?
Thank you.
On a form frmProba there are two unbounded combos: cboSifOO and cboSifOsoba
(just for this example here).
cboSifOO selects one of the departments from a table tblSifOO (text like
1.3.). Depending on this value the second combo selects the people from this
department only (this is a text, too). This new value would be transferred
into one field in a table tblTrening which is opened on a subform. This
means that the cboSifOsoba must be related to the tblTrening later.
Unfortunately I do not see what is missing in these few lines of code and I
can't continue further more.
The problem is in my improper syntax in WHERE clause. If I write down
something like .WHERE tblOsKarton.SifOO LIKE "1.3."; then cboSifOsoba shows
just what I need (selected persons).
Problematical code is .
Private Sub cboSifOO_AfterUpdate()
..
Me.cboSifOsoba.RowSource = "SELECT tblOsKarton.SifOsoba,
tblOsKarton.Prezime FROM tblOsKarton WHERE (((tblOsKarton.SifOO) =
Forms!frmProba!cboSifOO));"
..
End Sub
Do you see a catch?
Thank you.