W
wintera
I am having trouble requeying a calculated field in a main form after
updating data in a subform. There are many posts relating to requery however
I am a novice to db programming and the solutions assume too more knowledge.
The structure of the DB is:
The main form (pricing summary) is based on a query that includes fields from
multiple tables as well as calculated fields. One of the data items is a
'quote' field which forms the basis of the fields relating to pricing: profit,
margin, tax.
I have two main questions:
1) I could not make the quote field updatable in the main form so included
a subform with this data which was updatable. Is there a simple way of
making particular fields in the main form updatable when the form is based on
a query?
2) If not, how can I requery the pricing statistics (calculated fields in the
base query) when the quote is changed.
Basically the user want to view the data, look at the current quote, see how
much profit will be made and play around with the quote value until they are
happy with the profit margin.
The only solution currently is to include a save button in the sub form to
force a save and for the user to try 'requery all' in teh access 2007 toolbar.
Any direction would be greatly appreciated.
Ive seen suggestions for similar issues along the lines of:
Me.Dirty = False 'save record with new value
Me.[calculated text box].Requery
But not sure where to include this. Directly in the event code for the field
that the user is updating?
updating data in a subform. There are many posts relating to requery however
I am a novice to db programming and the solutions assume too more knowledge.
The structure of the DB is:
The main form (pricing summary) is based on a query that includes fields from
multiple tables as well as calculated fields. One of the data items is a
'quote' field which forms the basis of the fields relating to pricing: profit,
margin, tax.
I have two main questions:
1) I could not make the quote field updatable in the main form so included
a subform with this data which was updatable. Is there a simple way of
making particular fields in the main form updatable when the form is based on
a query?
2) If not, how can I requery the pricing statistics (calculated fields in the
base query) when the quote is changed.
Basically the user want to view the data, look at the current quote, see how
much profit will be made and play around with the quote value until they are
happy with the profit margin.
The only solution currently is to include a save button in the sub form to
force a save and for the user to try 'requery all' in teh access 2007 toolbar.
Any direction would be greatly appreciated.
Ive seen suggestions for similar issues along the lines of:
Me.Dirty = False 'save record with new value
Me.[calculated text box].Requery
But not sure where to include this. Directly in the event code for the field
that the user is updating?