lvengineer
Technical User
Hello All,
I am trying to extract data from a table bound to a form, peform some simple math on the data, and, display the results in a text box.
I am currently using the DLookup function for selecting table cells but would like to specify name in the DLookup or learn another method for "gleaning" data from tables.
My table1, "Activities" contains fields, Date:, Name:, Credit:.
Table 2, "Stats", contains field, Name:, Total Credit:.
I would like to sum the credit fields of both tables for a given name selected in my combobox.
Currently code is:
dblCr = DLookup("Sum([Credit:])", "Activities", "") + DLookup("Sum([Total Credit:])", "Stats", "")
Obviously, this yields credits for all users. How do I specify a particular name?
How do I code the name criteria? Is there a better way to get data from a table?
Thanks in advance,
Bruce
I am trying to extract data from a table bound to a form, peform some simple math on the data, and, display the results in a text box.
I am currently using the DLookup function for selecting table cells but would like to specify name in the DLookup or learn another method for "gleaning" data from tables.
My table1, "Activities" contains fields, Date:, Name:, Credit:.
Table 2, "Stats", contains field, Name:, Total Credit:.
I would like to sum the credit fields of both tables for a given name selected in my combobox.
Currently code is:
dblCr = DLookup("Sum([Credit:])", "Activities", "") + DLookup("Sum([Total Credit:])", "Stats", "")
Obviously, this yields credits for all users. How do I specify a particular name?
How do I code the name criteria? Is there a better way to get data from a table?
Thanks in advance,
Bruce