Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello ! New to Access and am l

Status
Not open for further replies.

Paul7905

MIS
Jun 29, 2000
205
US
Hello !

New to Access and am looking for direction~

I want to produce a report.

I found I can produce a simple report using the Query wizard however this wizard does not provide for what I would like to do.

Let me explain the data I want to report on ~

1. the data is in a sigle table
2. the data in the table consists of inventory item data,
examples of the data fields are:

a. Item Name
b. Item short name
c. Item Size
d. Item price retail
e. Item price wholesale
f. Item product information (several fields for this)

etc. etc. ~ there are about 25 fields altogether of
various types and lengths (currency, text,
date etc)

3. the users make changes to the data in this table.
4. the users want to be able to prioduce a report, on
request, that reflects all the changes that have been
made to the data (since the last time they ran the
report)

I have figured out how to track the changes, I do this by rolling the "current" or "active" data fields into a corresponding "Previous" field ~
then, by comparing the two fields later, i can determine
which fields are not identical and therefore have been
modified.

When i do this, I also set a series of Yes/No bytes in the record that tells which field in the record has changed
(I do this because there are so many fields that may
have changed I only want to show on the report the
record key and the fields that have changed so the user
does not have to look at all of them to figure out what
is different. *(these yes/no bytes are, for example:
"WholesalePriceChg"
"RetailPriceChg"
"ItemDescription1Chg"
"ItemDescription2Chg" and so on ~

these yes/no bytesin the record correspond to the data
field(s) that the user may have changed.

I have determined that i can do a query that selects, based on a specific byte set to yes (true), the two fields (current and prior) and produce a report of all the records for which just that particular field has changed.

My problem is, I don't want to produce 35 different reports (one for each field in the records) but rather, I want to produce just one report that shows all the changes, grouped by field type that has changed within record, i.e. for record "A", all the changed fields for that record but each on a seperate line ~ (with each field identified, with a heading (on a seperate or same line) i.e. like "Wholesale price current" ~ "Wholesale Price Previous" ~ and so on ~

I don't see how to do this using the report wizard ~ can someone point me in the right direction to do this (or am i stuck with 35 reports (any one of which may produce a blank page because that particular field may have not been changed in any of the records)~

in a nutshell i would like to produce the report such that the lines reported can change to reflect different fields on a record predicated on the "change bytes" in the record that are set to yes ~ (note that in a given record multiple fields may have changed,,,,, idealy i would like to show all the fields that have changed for this record grouped together ~ with each change on a seperate line ~

thanks so much in advance ~ (by the way, a few weeks ago i knew nothing of access and with the assistance of all of you willing to share your expertice i have come a very long way quickly !! [sig][/sig]
 
Hi Paul

Recently I had to make a report based on information that was missing from my database and I got the following code that may help you. Some modification will be necessary for it to work in your particular app though. Place the code in the on format event of the report.

Dim lblMissing As String
lblMissing = ""

'Title
If IsNull(Me![Title]) Then
lblMissing = "Title" & ", " + vbNewLine
End If

'Birthdate
If IsNull(Me![Birthdate]) Then
lblMissing = lblMissing & "Date of Birth" & ", " + vbNewLine
End If

'MaritalStatus
If Me![MaritalStatus] = 0 Then
lblMissing = lblMissing & "Marital Status" & ", " + vbNewLine
End If

MissingData = Left(lblMissing, Len(lblMissing) + 2)

If you still have trouble getting the report done you can mail me.

Umbane

m5gaut@mweb.co.za


[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top