I am working on improving a previously made database and I would really like to know how to get an expression as the control source of a textbox on a form to save into the table.
I have drawing numbers and each time something gets changed the issue goes from a to b etc... and each change is recorded in the database.
I have a main form that shows the current drawing number and then a subform showing all previous Issue changes. eg -date, why and who by..etc.
on my main form there is a textbox for "Issue" and "new Issue" I would like the main form to automatically input themost recent issue change into the "issue" textbox so that the user doesnt have to- which avoids mistakes.
I have put-
Code:
=DMax("newIssue","ECN Master List","[DrawingnNumber]=[Forms]![dataentryform]![Combo50]")
into the control source for "issue" on the main form
new issue- textbox on subform with most recent issue on it
ECN Master List- table with all data stored in
Combo50- the combobox with the current drawing number stored in it.
dataentryform- the name of my main form.
I have go the code to work by implementing a requery macro into the drawing number combox so that everytime it is changed the issue textbox updates with most recent issue.
however because the control source of the macro is an expression the value wont save into the table.
How would i go about getting this value saved to the table?? is there a way?
Thanks!