daveonion (Programmer) Sep 6, 2002
Alright Fancyprairie, once again thanks for your help,
the code i am using is below (same as the code you supplied), however an error message is returned when i select a region from the region combo as follows
"data provider failed while executing a command", i then click ok and the following appears
"Syntax error (missing operator)in query expression '(regions = region 3)'.
Region 3 is the region I selected from the first combo box, so what ever region I select it returns the same error only with the selected region i.e. region 1, region 2, region 3 etc.
Enterregioncom = first combo box
departmentqu = rowsource for second combo box
enterdeptcom = second combo box
regions = field in departmentqu
Code
if (len(enterregioncom.value)=0) then 'if true,nothing selected
enterdeptcom.disabled = true
enterdeptcom.value = 0
else
enterdeptcom.disabled = false
msodsc.RecordsetDefs.Item("departmentqu"
.ServerFilter = "regions = " &
enterregioncom.value
end if
any ideas where i am going wrong, i know i haven't declared a global variable as of yet, but i thought that it would work without it, am i using the wrong syntax or code somewhere, once again any help would be largely appreciated
Dave