SeadnaS
Programmer
- May 30, 2011
- 214
Hi,
I've just converted a macro I was using to VBA and I want a formula on it to be able to work on the table currently opened by the form (the record source).
I've got a button to click that calculates the average but it only calculates the average of Table1:
Average = DAvg("numbers", "Table1")
Now i want this to work on whatever table it is that is open by my form is there something that I can replace "Table1" with like "CurrentTable" or "OpenTable" or "RecordSource" something like that? I have a few different tables and they all have the field "numbers". Bear in mind im a beginner!
Thanks!
I've just converted a macro I was using to VBA and I want a formula on it to be able to work on the table currently opened by the form (the record source).
I've got a button to click that calculates the average but it only calculates the average of Table1:
Average = DAvg("numbers", "Table1")
Now i want this to work on whatever table it is that is open by my form is there something that I can replace "Table1" with like "CurrentTable" or "OpenTable" or "RecordSource" something like that? I have a few different tables and they all have the field "numbers". Bear in mind im a beginner!
Thanks!