Afternoon
I wonder if someone could advise on the following:
I need to display certain field values within a list box, having searched for the relevant record which include those fields. To explain more clearly:
Underlying query, Q for example, has records X, Y Z.
Underlying query attached to form, gives results:
X field A
X field B
X field C
Y field D
Y field A
Y field B
Z field E
Z field F
Z field A
The user enters and searches for required record, Y say, which (I would like!) should display all relevant fields in list box, as follows:
field D
field A
field B
Everything works find, - except the list box.
Using the SQL builder for the Row Source of my list box, as follows, displays ALL the fields for each of the above records X, Y and Z:
"SELECT DISTINCTROW [Q].[field] FROM [Q]"
I want to filter for and hence display ONLY those fields pertaining to record Y. Can this be achieved using SQL, or will I have to write more VBA at this stage? (I want to avoid using v Basic if I can!).
Cheers Magnetar
I wonder if someone could advise on the following:
I need to display certain field values within a list box, having searched for the relevant record which include those fields. To explain more clearly:
Underlying query, Q for example, has records X, Y Z.
Underlying query attached to form, gives results:
X field A
X field B
X field C
Y field D
Y field A
Y field B
Z field E
Z field F
Z field A
The user enters and searches for required record, Y say, which (I would like!) should display all relevant fields in list box, as follows:
field D
field A
field B
Everything works find, - except the list box.
Using the SQL builder for the Row Source of my list box, as follows, displays ALL the fields for each of the above records X, Y and Z:
"SELECT DISTINCTROW [Q].[field] FROM [Q]"
I want to filter for and hence display ONLY those fields pertaining to record Y. Can this be achieved using SQL, or will I have to write more VBA at this stage? (I want to avoid using v Basic if I can!).
Cheers Magnetar