Newbie here... coming from a world of creating UserForms for Excel.
While recently starting to tackle Access, I've created some initial forms and learned about Bound vs. Unbound columns. I've created a significant form bound to a Table. Several Text Boxes on Form need to contain values that are derivatives of the values in various fields on the Table, so I wrote VBA Macros to derive these values.
Looking back, it seems this might not be the best way.
I've now learned more about queries, and the ability to create these derived fields within the Result table of the Query.
As a matter of practice, is there a "best" way to design Forms?
It seems my initial attempt would be less efficient than using Bound columns to a Query that contains the values for the derived fields. The query would run once, doing the calculations, providing a source for the form's fields, versus the Form's Events needing to fire off and recalc the values needed each time the record changes on the form.
Is a good method to employ thus as follows:
1.) Design Layout of Form
2,) Create Query to Support Fields needed on Form
3.) Bind Form to Query, and Form's controls to Query fields
Further, is there a prevailing opinion on using VBA Functions/Subs versus Access' Macro builder to, for example, calculate the value for a Query field?
Any advice would be much appreciated.
Thanks,
Shred
While recently starting to tackle Access, I've created some initial forms and learned about Bound vs. Unbound columns. I've created a significant form bound to a Table. Several Text Boxes on Form need to contain values that are derivatives of the values in various fields on the Table, so I wrote VBA Macros to derive these values.
Looking back, it seems this might not be the best way.
I've now learned more about queries, and the ability to create these derived fields within the Result table of the Query.
As a matter of practice, is there a "best" way to design Forms?
It seems my initial attempt would be less efficient than using Bound columns to a Query that contains the values for the derived fields. The query would run once, doing the calculations, providing a source for the form's fields, versus the Form's Events needing to fire off and recalc the values needed each time the record changes on the form.
Is a good method to employ thus as follows:
1.) Design Layout of Form
2,) Create Query to Support Fields needed on Form
3.) Bind Form to Query, and Form's controls to Query fields
Further, is there a prevailing opinion on using VBA Functions/Subs versus Access' Macro builder to, for example, calculate the value for a Query field?
Any advice would be much appreciated.
Thanks,
Shred