473,385 Members | 1,548 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,385 software developers and data experts.

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)(listbox)(unbound).

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

New = User entered value to adjust equipment $ value (currency)(textbox)(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 2596
>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
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
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...
1
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...
3
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...
2
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...
1
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...
22
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....
0
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...
8
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...
1
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.