473,395 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Access Form isn't updating properly

1
Hello,

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.
PLEASE HELP!!!!
Nov 23 '16 #1
2 736
jforbes
1,107 Expert 1GB
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
Trigger your VB ifs' from the after update on the combo box.
Nov 23 '16 #3

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

Similar topics

2
by: Josh Strickland | last post by:
I am attempting to create an Access database which uses forms to enter data. The issue I am having is returning the query results from the Stored Procedure back in to the Access Form. ...
2
by: John | last post by:
I have an Access 2000 form that has a Hyperlink that opens an Excel 2000 worksheet located in the same network folder as the Access MDB. The Hyperlink works great. When users close the Excel...
6
by: Chris Zoper | last post by:
Hello, I have a form that shows a lot of records based on a passthrough query to a SQL Server database. I noticed that the Filter and the Sort property of the form do not properly work, often...
4
by: KPOJonesECC | last post by:
Hello, I am in the middle of an access database projet but are struggerling with a couple of things. I dont expect anyone to solve the problem for me, but would really appreciate a pointer in the...
12
by: Birky | last post by:
How can I stop a form from updating the database when a user closes the form? I have a form which is used for referencing, additions, and modifications but every time the form is closed with no...
4
by: rwm | last post by:
Hi Before updating to Access 2007 we could open outlook contact entries by using a hyperllink along the lines of <outlook://contacts etc> This does not seem to work in 2007 any more. We have a...
1
by: wrightgj | last post by:
Hello, I have a chart in an Access form that updates when the underlying table is updated, which occurs when a button is pressed. I also have the option of adding more records to the table, which...
2
by: beemomo | last post by:
hi everyone! i am using an active x control : date time picker in an access form that bound to date field in a table. Whenever it is displayed on my machine, the control can be displayed and...
16
by: John | last post by:
I am looking for VBA code that will work with Access 2003 to enable dragging and dropping a file/folder name from Windows XP Explorer into an Access form's text box. This is a common functionality...
7
by: Lynch225 | last post by:
Hello all, I have an issue with a form updating all records in a table except for the very last record for some reason. A little background, I have an unmatched query that appends results to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.