By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,561 Members | 3,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,561 IT Pros & Developers. It's quick & easy.

Access Form isn't updating properly

P: 1

I am fairly new to Access 2007 and am in need of help. I have a table where ingredients and invoice price information is stored, from that I have a query with a formula that converts price information into usable recipe units such as ounce, gram etc...
That all works great! However, I am working on creating a "RecipeForm" where I can create recipe costing. There is an "ingredient" Combobox that looks up ingredients from the query, you then enter "measure" and select "unit". Once the unit is selected it puts a price into a textbox from the correct unit conversion column from the query. How I did this is by entering
If Me.Unit = "oz" Then
Me.APUnit = Me.cboIngredient.Column(2)
End If
If Me.Unit = "gram" Then
Me.APUnit = Me.cboIngredient.Column(3)
End If
If Me.Unit = "ea" Then
Me.APUnit = Me.cboIngredient.Column(4)
End If

into the On Change Event of the unit combo box. This works, however, when I update ingredient prices in the table(which is properly querying), the form doesn't update the price unless I re-select the unit. I am guessing this has something to do with entering the if statement into the on change event however it doesn't work when I enter it into any other events. I really need the form to automatically update pricing because that is my true mission for creating this so things are more efficient.
Nov 23 '16 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,107
Typically, for something like this, there would be a trigger of sorts that fires when the underlying data is changed which could be used to update the UI. Like the OnCurrent Event of a SubForm (that allows the editing of the Pricing) would call a method in the MainForm that would perform a Requery, Refresh and/or Recalc as needed on the MainForm.

What I could not determine from your Question is how the Pricing Update is being accomplished.
Nov 23 '16 #2

P: 18
Trigger your VB ifs' from the after update on the combo box.
Nov 23 '16 #3

Post your reply

Sign in to post your reply or Sign up for a free account.