D
DawnTreader
sounds complicated doesn't it? here is how it looks:
http://img397.imageshack.us/my.php?image=newforms1es8.jpg
i am attempting to use a select case statement to filter the records that
show up for each tab within the "type" tab control form section.
the site form is based on a site table. that has a one to many relationship
with the product table. each of the yellow boxes indicate where data is
coming from the product table. each of the tabs with in the blue box labeled
"type" form needs to filter the products table based on the product type
field showing in the top thin yellow box. so when on the compressor tab, all
the data showing in the green "unit" form should relate to the unit serial #
in the thin yellow box at top.
if that serial number is related to a dispenser and not a compressor, i
would like the entire set of fields on the compressor tab to be locked or not
visible or show in some way that the current record is not a compressor.
what i am looking for is a bit of code help as to how to cause the effect i
want. currently i have tried this code:
Private Sub tabctrlProductType_Change()
Select Case ProductTypeID.Value
Case "Compressor"
.Filter = [ProductTypeID] = "Compressor"
.FilterOn = True
.Requery
Case "Dispenser"
.Filter = [ProductTypeID] = "Dispenser"
.FilterOn = True
.Requery
Case "Storage"
.Filter = [ProductTypeID] = "Storage"
.FilterOn = True
.Requery
Case "Fill Post"
.Filter = [ProductTypeID] = "Fill Post"
.FilterOn = True
.Requery
Case "Decanting Post"
.Filter = [ProductTypeID] = "Decanting Post"
.FilterOn = True
.Requery
Case Else
.FilterOn = False
.Requery
End Select
End Sub
i put this in the tab control's on change event, but it choked. i basically
borrowed this from a book, but i am not sure if this is the best way of doing
this.
if anyone has any suggestions or could help with code, please help.
thanks in advance.
http://img397.imageshack.us/my.php?image=newforms1es8.jpg
i am attempting to use a select case statement to filter the records that
show up for each tab within the "type" tab control form section.
the site form is based on a site table. that has a one to many relationship
with the product table. each of the yellow boxes indicate where data is
coming from the product table. each of the tabs with in the blue box labeled
"type" form needs to filter the products table based on the product type
field showing in the top thin yellow box. so when on the compressor tab, all
the data showing in the green "unit" form should relate to the unit serial #
in the thin yellow box at top.
if that serial number is related to a dispenser and not a compressor, i
would like the entire set of fields on the compressor tab to be locked or not
visible or show in some way that the current record is not a compressor.
what i am looking for is a bit of code help as to how to cause the effect i
want. currently i have tried this code:
Private Sub tabctrlProductType_Change()
Select Case ProductTypeID.Value
Case "Compressor"
.Filter = [ProductTypeID] = "Compressor"
.FilterOn = True
.Requery
Case "Dispenser"
.Filter = [ProductTypeID] = "Dispenser"
.FilterOn = True
.Requery
Case "Storage"
.Filter = [ProductTypeID] = "Storage"
.FilterOn = True
.Requery
Case "Fill Post"
.Filter = [ProductTypeID] = "Fill Post"
.FilterOn = True
.Requery
Case "Decanting Post"
.Filter = [ProductTypeID] = "Decanting Post"
.FilterOn = True
.Requery
Case Else
.FilterOn = False
.Requery
End Select
End Sub
i put this in the tab control's on change event, but it choked. i basically
borrowed this from a book, but i am not sure if this is the best way of doing
this.
if anyone has any suggestions or could help with code, please help.
thanks in advance.