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

How to find differences between datasets in a table

I have to import building information from another system. I've decided to
keep track of each set of data downloaded by including a Download_Date. That
way I keep historical data.

My table has 25 fields in addition to Download_Date.

My question. I'd like the user to be able to find differences between
downloads. The primary key on the table is Building_ID and Download_Date.

I'd like a user to be able to select two values for Download_Date on a form
and then have the records based on Building_ID show up in a listbox if there
are any differences. So I'd probably have two listboxes, one showing the
record for the newer Download_Date and one for the older Download_Date.

So how do I code this. I need to be able to find differences in any field.
If different values for any field for the same Building_ID are found between
the download_dates, then display that record in one of the listboxes.
Also, what if a new Building_ID shows up or one disappears.
Ideas are appreciated.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200607/1
Jul 22 '06 #1
4 2804
"rdemyan via AccessMonster.com" <u6836@uwewrote in
news:63a50096a3240@uwe:
I have to import building information from another system.
I've decided to keep track of each set of data downloaded by
including a Download_Date. That way I keep historical data.

My table has 25 fields in addition to Download_Date.

My question. I'd like the user to be able to find differences
between downloads. The primary key on the table is
Building_ID and Download_Date.

I'd like a user to be able to select two values for
Download_Date on a form and then have the records based on
Building_ID show up in a listbox if there are any differences.
So I'd probably have two listboxes, one showing the record
for the newer Download_Date and one for the older
Download_Date.

So how do I code this. I need to be able to find differences
in any field. If different values for any field for the same
Building_ID are found between the download_dates, then display
that record in one of the listboxes. Also, what if a new
Building_ID shows up or one disappears.
Ideas are appreciated.
I'd suggest a large textbox instead of listboxes, because of
sync issues. I'd have a combobox or listbox select one building
id, and two comboboxes, one for each date.

I'd code a routine that opens 2 datasets, one for the first date
and one for the second, filtered for 1 building ID. Then I'd
loop through the fields collection of the recordsets, and since
they are from the same table, each field will be in the same
position, making comparison easy

something like (air code)
if nz(rs1.fields(idx),"Blank") _
<nz(rs2.fields(idx)," Blank" then
me.comp = me.comp _
& rs1.fields(idx).name _
& " was " & rs1.fields(idx).value _
& " Changed to " & rs2.fields(idx).value
& vbnewline
end if

this will add a row to the textbox for each field that's
different.

It should handle missing and added Id's just fine.
--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 23 '06 #2
Thanks, Bob.

I've taken your suggestion and implemented it. However, my code cycles
through all Building_IDs and not just one at a time.

So, the textbox text is getting pretty large and unreadable. I'd like to
print it to a report. How do I do that, as I'm concerned with the length of
the text.

Thanks.

Bob Quintal wrote:
>I have to import building information from another system.
I've decided to keep track of each set of data downloaded by
[quoted text clipped - 20 lines]
>>
Ideas are appreciated.

I'd suggest a large textbox instead of listboxes, because of
sync issues. I'd have a combobox or listbox select one building
id, and two comboboxes, one for each date.

I'd code a routine that opens 2 datasets, one for the first date
and one for the second, filtered for 1 building ID. Then I'd
loop through the fields collection of the recordsets, and since
they are from the same table, each field will be in the same
position, making comparison easy

something like (air code)
if nz(rs1.fields(idx),"Blank") _
<nz(rs2.fields(idx)," Blank" then
me.comp = me.comp _
& rs1.fields(idx).name _
& " was " & rs1.fields(idx).value _
& " Changed to " & rs2.fields(idx).value
& vbnewline
end if

this will add a row to the textbox for each field that's
different.

It should handle missing and added Id's just fine.
--
Message posted via http://www.accessmonster.com
Jul 23 '06 #3
Actually, I guess what I could do is to write each line added to the textbox
to a table with a single field type equal to Memo. That way I can easily
print directly from the table.

rdemyan wrote:
>Thanks, Bob.

I've taken your suggestion and implemented it. However, my code cycles
through all Building_IDs and not just one at a time.

So, the textbox text is getting pretty large and unreadable. I'd like to
print it to a report. How do I do that, as I'm concerned with the length of
the text.

Thanks.
>>I have to import building information from another system.
I've decided to keep track of each set of data downloaded by
[quoted text clipped - 26 lines]
>>
It should handle missing and added Id's just fine.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200607/1
Jul 23 '06 #4
"rdemyan via AccessMonster.com" <u6836@uwewrote in
news:63b1c6db46d94@uwe:
Thanks, Bob.

I've taken your suggestion and implemented it. However, my
code cycles through all Building_IDs and not just one at a
time.

So, the textbox text is getting pretty large and unreadable.
I'd like to print it to a report. How do I do that, as I'm
concerned with the length of the text.

Thanks.
Do it the same as a form. However, if I were designing the app,
I'd still use the one textbox per row. If you put the code in a
module as a user defined function that returns the string, you
could use that functrion in a query to bring up a continuous
rows form/report..

You would need to create a query that returns the unique
building IDs plus the udf and use that as the recordsource for
your form/report.
Bob Quintal wrote:
>>I have to import building information from another system.
I've decided to keep track of each set of data downloaded by
[quoted text clipped - 20 lines]
>>>
Ideas are appreciated.

I'd suggest a large textbox instead of listboxes, because of
sync issues. I'd have a combobox or listbox select one
building id, and two comboboxes, one for each date.

I'd code a routine that opens 2 datasets, one for the first
date and one for the second, filtered for 1 building ID. Then
I'd loop through the fields collection of the recordsets, and
since they are from the same table, each field will be in the
same position, making comparison easy

something like (air code)
if nz(rs1.fields(idx),"Blank") _
<nz(rs2.fields(idx)," Blank" then
me.comp = me.comp _
& rs1.fields(idx).name _
& " was " & rs1.fields(idx).value _
& " Changed to " & rs2.fields(idx).value
& vbnewline
end if

this will add a row to the textbox for each field that's
different.

It should handle missing and added Id's just fine.


--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Jul 23 '06 #5

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

Similar topics

0
by: William Ryan | last post by:
At the risk of sounding like a Big 5 consultant, "It depends". 1) Strongly typed datasets rock, they are faster than untyped, use intellisense... but your reason for wanting to use them is...
2
by: beyond | last post by:
i need a sql-statement for this problem i ve got a table like this ID;value 1;30 2;34 3;44 the result of sql-statement should calculate differences to previous/other datasets like this
45
by: cody | last post by:
I've seen an Introduction on ADO.NET with its Datasets on .NET TV and Iam now wondering how it is realized/used in real world applications. I don't believe that one would create a dataset and add...
2
by: malcolm | last post by:
Hello, We have a robust (.NET 1.1 c# winforms) client-server application that utilizes many typed DataSets, typed DataTables and typed DataRows. Our application is a series of windows and popup...
3
by: Andreas Huber | last post by:
Hi there I have two typed DataSets. One represents the state of a certain DB table some time ago, the other represents the current state of the same DB table. Now I would like to get the changes...
7
by: TJoker .NET | last post by:
I'm developing an VB.NET Windows Forms application that uses CR for VS.NET (original version shipped with VS.NET 2002 - my VS.NET has the latest SP installed, no SPs for CR). My reports get their...
4
by: S Chapman | last post by:
Is there any tool that generates Typed DataTables rather than Typed Datasets? The trouble we are having is we have quite a few tables in our database and a single table can be a part of more than...
9
by: Ryan | last post by:
I'm learning when it comes to Datasets. Should I just have a single dataset to handle my entire application data or should I use multiple - a dataset for each function or form within my...
1
by: Mark Baldwin | last post by:
Steven Thanks for your reply, however the typed datasets are defined in the web service and there seems to way to open the partial class code window - double clicking on the design surface does...
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: 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
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
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,...
0
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...
0
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,...
0
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...

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.