A
Arvi Laanemets
Hi
My setup is:
I have a form (fmDeviceGroup) with a combo box (where device group is
selected) and a subform (fmDevices), where parameters for selected device
from this group are listed). The form fmDeviceGroup will be later inserted
into unbound multi-sheet form (fmMain).
On form fmDevices is a text box txtParentDeviceGroup, which reflects the
group, selected in parent form, and is used as a source for various
calculations in fmDevices. (DeviceGroup value is a single character, and is
also used as a leftmost character in DeviceID field - which is a master
index field for tblDevices table).
I need a combo box on form fmDevices, to navigate to selected record from
current group. I.e. combo must allow to select from all devices for which
leftmost character of DeviceID is equal with value of txtParentDeviceGroup.
What must be the SQL syntax for this?
SELECT [tblDevices].[DeviceID], [tblDevices].[DeviceName] FROM tblDevices
WHERE (((Left([tblDevices].[DeviceID],1))=???));
Thanks in advance!
My setup is:
I have a form (fmDeviceGroup) with a combo box (where device group is
selected) and a subform (fmDevices), where parameters for selected device
from this group are listed). The form fmDeviceGroup will be later inserted
into unbound multi-sheet form (fmMain).
On form fmDevices is a text box txtParentDeviceGroup, which reflects the
group, selected in parent form, and is used as a source for various
calculations in fmDevices. (DeviceGroup value is a single character, and is
also used as a leftmost character in DeviceID field - which is a master
index field for tblDevices table).
I need a combo box on form fmDevices, to navigate to selected record from
current group. I.e. combo must allow to select from all devices for which
leftmost character of DeviceID is equal with value of txtParentDeviceGroup.
What must be the SQL syntax for this?
SELECT [tblDevices].[DeviceID], [tblDevices].[DeviceName] FROM tblDevices
WHERE (((Left([tblDevices].[DeviceID],1))=???));
Thanks in advance!