473,320 Members | 2,048 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,320 software developers and data experts.

Expression will not calculate off of an auto-populating price column

My database is simple. It has a table that tracks customers, with they're name, address, etc.

I have a price list table that contains "iteminstall" , "price", and "qty"

and I have a payment table that trackes date, and payment amount.


I have a subform, with the field (textbox) "price." I have it auto populate when I type in something under (combobox) "iteminstall". This is a recent addition. I used to have to type it manually.

In the subform, "iteminstall" is a combo box, and price is a text box.
In the footer of the subform, I have the expression:
=Sum([price]*[qty]).
On the main form I have a text box that links to this field, to display a subtotal. Now the price is autopopulating in the subform, but it is not changing my subtotal. This only started happening when I set "price" to autopopulate. The existing subtotal is still there, but If I add anything to the order, it won't update the subtotal. Instead, it continues to display the old subtotal.

I added a new record, and tried entering some new data, but subtotal is outputing "0" on all new records. Any Ideas?
Jun 20 '08 #1
3 2000
puppydogbuddy
1,923 Expert 1GB
Try updating the subtotal on the main form in iteminstall combobox's after update event, using the code shown below. Since the iteminstall combobox is on the subform, the following code should be placed with the subform code.

Private Sub itemInstall_AfterUpdate()

Me.Parent.Subtotal.Recalc

End Sub


You need to replace the names I used for your combobox and subtotal control with the actual names if the actual names are different.
Jun 21 '08 #2
Try updating the subtotal on the main form in iteminstall combobox's after update event, using the code shown below. Since the iteminstall combobox is on the subform, the following code should be placed with the subform code.

Private Sub itemInstall_AfterUpdate()

Me.Parent.Subtotal.Recalc

End Sub


You need to replace the names I used for your combobox and subtotal control with the actual names if the actual names are different.
OK, I TRIED THIS, AND GOT THE FOLLOWING MESSAGE:

RUN-TIME ERROR '438'
OBJECT DOESN'T SUPPORT THIS PROPERTY OR METHOD.

WHAT ELSE CAN I DO?
Jun 24 '08 #3
puppydogbuddy
1,923 Expert 1GB
OK, I TRIED THIS, AND GOT THE FOLLOWING MESSAGE:

RUN-TIME ERROR '438'
OBJECT DOESN'T SUPPORT THIS PROPERTY OR METHOD.

WHAT ELSE CAN I DO?
Ok, try changing this: Me.Parent.Subtotal.Recalc

To This: Parent.Subtotal.Recalc

If that does not work, post back with the code exactly as you have it.
Jun 24 '08 #4

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

Similar topics

2
by: Branko Collin | last post by:
Hello, The following is perhaps not directly a CSS problem, but it does seem to involve Internet Explorer's stylesheet handling. I tried Svend Tofte's solution for using expressions in...
3
by: Csaba Gabor | last post by:
How, using javascript, can you set or change a CSS value from something to something else which has the IE proprietary format: expression(javasriptCode)? I'd like to know the answer in...
0
by: Rolan | last post by:
I'm using Access 97 and need some assistance in sorting out a proper DSum expression, or maybe even DCount might be an alternative. I have tried numerous combinations, but with no apparent success....
1
by: gretchen.ogrady | last post by:
I admit - I'm a simple user but looking to improve skills. Instructions aren't helping and have searched this group but am getting bogged down by some of the programming-speak. I have a query...
7
by: hungrymind | last post by:
Hi all, I am developing some control (textbox based), to validate inputs to that control I am using regular expression, where pattern is generated dynamically. I need to identify what all...
6
by: frankh | last post by:
Got earlier very valuable feedback from this group, so I am trying again. Given a string with an arithmetic expression containing variables, e.g. "a+b*sin(x)", how can I calculate its value...
1
by: mark | last post by:
In the sample code for Programming Microsoft Visual Basic.NET by Francesco Balena (Microsoft Press) there is a program (ExprEvaluator) that evaluates expressions. It has a bug in that when the...
1
by: Vishnu Kumar Tiwari | last post by:
I am using below expression in xsd... I am getting devide by zero error. For ur information I am filling the dataset with the results obtained from Stored procedure. Now again I need to...
2
by: deanoooo812 | last post by:
I have an Access query (written in MS Access 2000 - thats all we've got - don't get me started on that topic...) for making pharmacy dispensing labels based on an extract from an automated dispensing...
18
by: dspfun | last post by:
Hi! The words "expression" and "statement" are often used in C99 and C- textbooks, however, I am not sure of the clear defintion of these words with respect to C. Can somebody provide a sharp...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.