T
TonyB
I want to write a function that could be reused on several forms, each of
which is based upon a different table.
The function needs to find the number of records which have todays date in a
field, which has a different name
in each table. Then it builds up a string which contains the date and number
of records, which is then returned by
the function.
Ideally I should be able pass this function the name of the table, and the
name of the field, and it would return
the text string I require.
I'm still getting to terms with VBA and data objects. Will I need to add a
variant of the function into each form ?
or can I generalize the function so it would work in any of the forms as
long as I can pass the table & field that contains
the date being used by that form ? I'm puzzled how to refer to the table and
the relevant field in the table in my code
and pass it into the function ?
TIA
Tony
which is based upon a different table.
The function needs to find the number of records which have todays date in a
field, which has a different name
in each table. Then it builds up a string which contains the date and number
of records, which is then returned by
the function.
Ideally I should be able pass this function the name of the table, and the
name of the field, and it would return
the text string I require.
I'm still getting to terms with VBA and data objects. Will I need to add a
variant of the function into each form ?
or can I generalize the function so it would work in any of the forms as
long as I can pass the table & field that contains
the date being used by that form ? I'm puzzled how to refer to the table and
the relevant field in the table in my code
and pass it into the function ?
TIA
Tony