I would like to display the calculated field result from a query in a text box on the form
I have a Training details form which has a control, Training_Date text box and then a combo box Frequency which has a number of set days. This is calculated in the query and I would like to have the result displayed in the form control Due_Date once the choice from the combo box is chosen.
This will then allow the value to be recorded in the table allowing for reports and queries on training due.
I have tried a number of methods without any luck as yet.
I placed your code in the update event for cboDue_Date and it still didn't work, I then put the Control Source for txtDue_Date as =[qryTraining Query]![Due_Date]. I am now displaying #Name? in the text box.
This is the code in the form module.
'Code to display calculated field from Training_Query in form
Private Sub cboFrequency_AfterUpdate()
Me.[txtDue_Date] = Dateadd("d", [cboFrequency], Datevalue([txtTraining_Dat