I have an update query which calls up a function for a field.
The function uses an input box to take a value with which to enter into the field.
The problem is that the function seems to run 3 times
the sql for the the query is:
UPDATE Base_Patient SET Base_Patient.pa_visit = updatevisit()
WHERE (((Base_Patient.Pa_id)=[Forms]![OL_Main]![ChForm].[Form]![pa_id]));
and the function code is :-
Function updatevisit()
updatevisit = InputBox("Please enter a visit number"
End Function
The idea is that the visit number entered will be updated in the table base_patient based on the row selected in a list box on a subform.
Hope you follow this
Regards
Matt
matt@begg-uk.co.uk
The function uses an input box to take a value with which to enter into the field.
The problem is that the function seems to run 3 times
the sql for the the query is:
UPDATE Base_Patient SET Base_Patient.pa_visit = updatevisit()
WHERE (((Base_Patient.Pa_id)=[Forms]![OL_Main]![ChForm].[Form]![pa_id]));
and the function code is :-
Function updatevisit()
updatevisit = InputBox("Please enter a visit number"
End Function
The idea is that the visit number entered will be updated in the table base_patient based on the row selected in a list box on a subform.
Hope you follow this
Matt
matt@begg-uk.co.uk