Bound Form needs field1 Average disp. by field1 Bound Text box

  • Thread starter Thread starter website designer via AccessMonster.com
  • Start date Start date
W

website designer via AccessMonster.com

Data entry form:
I need to display two text boxes:
1. the average value of a field1 from existing data
2. a bound text box that is waiting for data entry for field1.

Further, the value of the field needs to be restricted to two fields:
1. the store-number selected from the combo box
2. the accounting-period from another combo-box

the average query might look like:
select avg field1 where store-number = combo-box and accounting-period between combo-box and combo-box - 365
 
Hi,




DAvg("field1", "tableName", "[store_number]=FORMS!FormName!store AND
[accounting_period] BETWEEN FORMS!FormName!ComboBox AND
FORMS!FormName!ComboBox -365")




Dxxx and DoCmd.RunSQL (for action queries) allows you to use the syntax
FORMS!FormName!ControlName without having to use any 'delimiter'.




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top