J
JustinP
I have two combo boxes:
cboSector
cboSite
The control source for cboSector is a value list
The control source for cboSite is a query
When the user selects a value from cboSector, the cboSite requeries and
that works fine. What I also need is when the user select a value from
cboSite I need cboSector.Value to show the value from a query (but not
requery the actual control source of the combo box itself).
Below is the AfterUpdate of cboSite. The query sqlSector is the correct
query I want to look up, but how do I set the value of cboSector.Value
to the value from the query.
40 If cboSite.Value <> "Any" And cboSector.Value = "Any" Then
50 sqlSector = "SELECT SECTOR FROM Vege_Parameter WHERE SITE_ID =
'" & cboSite.Value & "'"
60 cboSector.Value = sqlSector
70 End If
Please ask if it is unclear.
cboSector
cboSite
The control source for cboSector is a value list
The control source for cboSite is a query
When the user selects a value from cboSector, the cboSite requeries and
that works fine. What I also need is when the user select a value from
cboSite I need cboSector.Value to show the value from a query (but not
requery the actual control source of the combo box itself).
Below is the AfterUpdate of cboSite. The query sqlSector is the correct
query I want to look up, but how do I set the value of cboSector.Value
to the value from the query.
40 If cboSite.Value <> "Any" And cboSector.Value = "Any" Then
50 sqlSector = "SELECT SECTOR FROM Vege_Parameter WHERE SITE_ID =
'" & cboSite.Value & "'"
60 cboSector.Value = sqlSector
70 End If
Please ask if it is unclear.