Inventory Query

  • Thread starter Thread starter Juli
  • Start date Start date
J

Juli

Before I start attempting to create my queries in this
database I have a couple of questions.

This is what I would ideally like to happen.

I have 7 different media types in my Library database.
Each media type has several fields associated with it.
Some are global fields and some are specific to the media
type.

I would like a query where a value other than media type
could be selected (such as Author or Artist) and the
query would only show the fields that are associated with
the particular media types found for that value, instead
of having to show all available fields.

Is this possible?

Thanks in advance
 
Hi,


A possible solution is to use a form-subform and change the sub-form
accordingly to the "subtype" of the record now "active" in the main form
(onCurrent event):


Me.SubFormControl.SourceObject = Me.UseWhatWithSubType ' string of a
form name to use as subform


or

Select case Me.SubType
Case "Electricity"
Me.SubFormControl.SourceObject= "ElectricityBill"
Case "Water"
Me.SubFormControl.SourceObject= "WaterBill"
Case "Car"
Me.SubFormControl.SourceObject= "CarExpenses"
Case ...

End Select

(the problem with the SELECT CASE is about adding a new "case" require you
touch the code, while if you can proceed through data stored in table, that
become much easier to maintain, or for you client add, to personalize, the
application, to the particular needs, without requiring your client to touch
your code! ).


Hoping it may help,
Vanderghast, Access MVP
 
Back
Top