Please Help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I built a database that is used to record tests for my company's different
electrical products. A basic overview:

First table - [UnitData] which contains serialno, createddate, unittype etc..
Then a few tables which contain the results from the different tests called
CD23, DA36, DA38, TC75 and more.

To show the history of each unit i have created a union queiry that combines
some the similar data from CD23 DA26 and the other tests(such as date, person
who did the test, and wether it passed or not), and inserted it as a sub form
into a form that displays data from [UnitData].

What i need now is for the user to open up the full related report they are
looking at in the query. Maybe a button that opens the record the query's
record is drawing from.

Any help would be much appreciated as this is all i need to do to complete
my database.

Thanks


Ps Please ask for more info if what i have written isn't clear.
 
enrico1982 said:
Hi,

I built a database that is used to record tests for my company's
different electrical products. A basic overview:

First table - [UnitData] which contains serialno, createddate,
unittype etc.. Then a few tables which contain the results from the
different tests called CD23, DA36, DA38, TC75 and more.

To show the history of each unit i have created a union queiry that
combines some the similar data from CD23 DA26 and the other
tests(such as date, person who did the test, and wether it passed or
not), and inserted it as a sub form into a form that displays data
from [UnitData].

What i need now is for the user to open up the full related report
they are looking at in the query. Maybe a button that opens the
record the query's record is drawing from.

Any help would be much appreciated as this is all i need to do to
complete my database.

Thanks


Ps Please ask for more info if what i have written isn't clear.

I fear I don't understand your business so I don't understand what all
those filed names mean, so I am going to guess and my comments may not
apply.

I am guessing that your primary problem is your table design. I
suggest that you start thinking about a logical table design.

A table should be a collection of data about a specific group of events,
people or things. Each record should record specific things about that
primary subject. For example you might want to keep information about each
test that you perform.

You may want to know about the time and date of the test, who performed
it, what settings may have been used etc. Each of these will be a separate
field.

A single event (test) may have generated results for a number of
products. Maybe one test will check 20 samples of your product and each
sample may have several results. These samples should normally be in
another table. Let's call this one samples.

The sample record will include a link to the first "Test" table, this
can be an auto number and its only use is to provide the link. It also will
identify the sample, maybe a serial number color date or anything else of
interest. It will also have additional fields for the results of the test.

Any time you have repeated fields with the same kind of information in a
single record. you are likely doing it wrong.

Any time you have repeated records with the same data in certain fields
you are likely doing it wrong. For example if you are listing your
company's employees and you list the work address you will end up repeating
125 Main St. over and over. There you want to have an Address table and
just link to it. If you are listing your friends, while you may have a few
at the same address most will not be the same and normally you would not
make a separate table for their addresses.

I hope that helps.
 
Thanks Joseph,

I think my database is logical, i have followed normalisation procedures.
The problem i think, is my database needs to be in a format that is not
standard. With out looking at the database it is very hard to explain the
problem.

Thanks a lot anyway
 
Hi,

I built a database that is used to record tests for my company's different
electrical products. A basic overview:

First table - [UnitData] which contains serialno, createddate, unittype etc..
Then a few tables which contain the results from the different tests called
CD23, DA36, DA38, TC75 and more.

Are these tables of identical structure, or does each test have its
own set of fields?
To show the history of each unit i have created a union queiry that combines
some the similar data from CD23 DA26 and the other tests(such as date, person
who did the test, and wether it passed or not), and inserted it as a sub form
into a form that displays data from [UnitData].

Not editable of course...
What i need now is for the user to open up the full related report they are
looking at in the query. Maybe a button that opens the record the query's
record is drawing from.

Any help would be much appreciated as this is all i need to do to complete
my database.

What you can do - if I understand your table structure correctly - is
use a command button on the Form to open a Report; the Report would be
based on a query which references some control on the Form specifying
what information goes in the report. Or, you could edit the VBA code
in the command button to pass a specific WhereCondition argument to
the OpenReport method:

Private Sub cmdOpenReport_Click()
Dim strSQL As String
strSQL = "[SerialNo] = '" & Me!txtSerialNo & "'"
DoCmd.OpenReport "MyReport", WhereCondition := strSQL
End Sub

will open a report named MyReport and show data for the currently
selected SerialNo. Without knowing more about how these reports differ
I can't be more precise about how to do this though!

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Not A Clue 4
Special characters 3
Popup Form 8
how should i set this up? 3
cannot link Foxpro file as table, access2000 3
Help with queiries. 3
Help needed #MsAccess 1
Union Queries 5

Back
Top