473,385 Members | 1,353 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.

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 2802
"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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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

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.