473,545 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Performing calculations using data from multiple ListBoxes and Multiple tables

Sorry if it is way to much information but I'm trying to cover all bases
Access 97

A= combobox that queries Distributor
B= combobox that limits customers by distributor in a
C= combobox that shows equipment inventory at b

OriginalVAL= query that extracts original $ amount from INV table based on matching EquipmentID seleced in C (currency)(list box)(unbound).

BTA = query that calculates total amount for all $ transactions for equpipment matching EquipmentID in BTAADJUST Table (currency)(list box)(unbound).

New = User entered value to adjust equipment $ value (currency)(text box)(unbound).

All the above function as intended.

ADJENTRY = BTA-NEW does not

I'm trying to subtract NEW-BTA to get the resulting $ adjustment to post into the BTAADJUST Table. But I am unable to get the calculations to work, I just get a blank control. I'm assuming that I'm not actually populating the listboxes with the data from the queries, and that is why the calculations do not work. I've tried setting the value of ADJUSTENTRY in the forms vb secion ADJUSTENTRY=bta .itemdata(0)-new which does not work either. I'm not completely sure if I should even be passing this data to a listbox, or if there is an easier way to handle this. (I'm self teaching)
Any help would be appriciated.

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
2 2599
>From the sound of things, you have the Multi-select property of the
listbox set to true, and you can't query the results directly. You
have to OR together the values in the ItemsSelected collection.
There's code for this right here... see if this solves your problem:
http://www.mvps.org/access/forms/frm0007.htm

Nov 13 '05 #2
I see where the code is going but I'm not mutiple selecting from the listboxes (flag is set to none). I'm using them to show the query results because I need to show the end-users the values. I was just trying to use the values already queried and do the calculations on the form directly. I'm assuming that I'm not containg the query results correctly.

Maybe I'm going about this wrong. Can I contain the query results in any other type of control but a list/combobox?

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4258
by: Steve | last post by:
Hi, Have a database that contains various tables. I need to run a query on two tables. Table A contains a column called Titles Table B contains a column called Uni_Titles
11
4624
by: lduperval | last post by:
Hi, I`m trying to do date calculations in three types of time zones: local, GMT and specified. The issue I am facing is that I need to be able to specify a date in the proper time zone, and I`m having a heck of a time doing so. I have created a form where I use drop downs do specify year, month, date, hour, minute and seconds. When the...
1
2273
by: chris vettese | last post by:
I'm looking for advice on how to perform calculations on my forms. Iwill try to explain the situation as clearly as possible. I have a form that has multiple sub-forms. Some of these sub-forms have sub-forms in themselves. On Each of these forms there are calculation fields. Some of these calculations use data from the parent form. Here...
3
2565
by: brian kaufmann | last post by:
Hi, I had sent this earlier, and would appreciate any suggestions on this. I need to make calculations for unemployment rate for three different data sources (A,B,C) for many countries and age groupings. The calculation is: unemployment rate = number of unemployed/number of labour force
2
2719
by: DC Gringo | last post by:
I have two listboxes, the first of which is an autopostback=true that allows multiple row selection. When I select multiple values (by holding down CTL) in the first one, it should query the second one. I seem unable to do this as it only sends back the first item I select whether I have the CTL key down or not. Upon the return trip, I can...
1
917
by: David | last post by:
I am having a problem with a Datasource connection being broken each time I start the IDE in VB.NET 2003. I have a database with 4 tables. On the form are 4 listboxes with each of their data source properties set to one of the 4 tables and the required field selected in each display member. The program runs fine and I can start and stop...
22
7133
by: robertmeyer1 | last post by:
Hi. I have been working on creating the structure of a DB and now I am trying to create some queries which will perform calculations. I have 1 table, tblAnswers which is based off an append query. tblAnswers contains a list of prepopulated questions and corresponding answers (numeric) which are filled in on the forms. So tblAnswers has 4...
0
1402
by: koonda | last post by:
Hi guys, I posted a message before and I got some help from the forum. I have a database in SQL Server and I wanted to create a web interface in C#. I had 4 Listbox controls and a Textbox and two buttons for this. What I want to do is to select values from 4 Listbox controls and input some text in the textbox i.e year to display information on...
8
5088
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are indexed). dbo.maintable(ProfileID int pk) dbo.fts_table(ProfileID int pk fk, col1 xml, col2 xml, col3 xml) I want to perform a query that will return...
0
7468
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7757
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.