J
Jeremy Saul
I have a query in Access 2000 which uses the value of a form control in an
expression to add a fixed value onto the contents of a field. The query is
run from within a procedure called in response to clicking a button on the
form after some other calculations have loaded the control. The expression
is something like:
Parent: [table1]![parent] + [forms]![form1].[control1]
What I find is that this seems to return a null value when run from the form
as described, but works fine if I run the query directly by double-clicking
on its icon.
Any ideas why the value of the control cannot be accessed when called from a
VB subroutine? The control is unbound. I use a similar technique in other
queries called in the same way with no problems at all, but there the value
of the control is used in the selection criteria to provide a variable
filter.
expression to add a fixed value onto the contents of a field. The query is
run from within a procedure called in response to clicking a button on the
form after some other calculations have loaded the control. The expression
is something like:
Parent: [table1]![parent] + [forms]![form1].[control1]
What I find is that this seems to return a null value when run from the form
as described, but works fine if I run the query directly by double-clicking
on its icon.
Any ideas why the value of the control cannot be accessed when called from a
VB subroutine? The control is unbound. I use a similar technique in other
queries called in the same way with no problems at all, but there the value
of the control is used in the selection criteria to provide a variable
filter.