Please Help!

E

enrico1982

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.
 
E

enrico1982

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
 
J

John Vinson

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]
 
Top