Access2000: reference to control in SQL

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!
 
A

Arvi Laanemets

OK, I did find a workaround. I did refer to combo on parent form instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top