Hi All,
I have 'custom query builder' in a main (Header) & sub form (Criteria), where the user selects a field name (combo) from a table, operator (combo), & value (textbox).
I also have a function to return the TableDef DataTypeName of the Field name selected, which works as expect for a single sub form record (and for all table fields, tested by a sub procedure via a loop).
I've added a textbox in the subform which calls the function, however instead of returning the correct DataTypeName for the field name of each record in the subform, it repeats the DataTypeName of the first record for all subsequent records.
I've also tried to work around by adding a calculated field to the table itself, but it won't accept the function (I understand only limited functions are available).
FYI I'm using the DataTypeName to then limit the available operators in the combobox and to determine whether text identifiers are needed when building the query in SQL.
Any idea's how I can achieve this?
Thanks
Tooley
I have 'custom query builder' in a main (Header) & sub form (Criteria), where the user selects a field name (combo) from a table, operator (combo), & value (textbox).
I also have a function to return the TableDef DataTypeName of the Field name selected, which works as expect for a single sub form record (and for all table fields, tested by a sub procedure via a loop).
I've added a textbox in the subform which calls the function, however instead of returning the correct DataTypeName for the field name of each record in the subform, it repeats the DataTypeName of the first record for all subsequent records.
I've also tried to work around by adding a calculated field to the table itself, but it won't accept the function (I understand only limited functions are available).
FYI I'm using the DataTypeName to then limit the available operators in the combobox and to determine whether text identifiers are needed when building the query in SQL.
Any idea's how I can achieve this?
Thanks
Tooley
Last edited: