T
Tyrone Glover
I am trying to add on to an already complex Asset Tracking Database that
I've created and I'm going to try to explain what I'm trying to do.
The main form is a Continuous Form called frmAssets. The following is an
example of how that data is entered:
Asset Name: Windows XP Professional
Category: Software
Subcategory: Operating System
Make: Microsoft Corporation
Asset Name: Canon PowerShot S60
Category: Hardware
Subcategory: Digital Camera
Make: Canon
How it is setup currently is that if you Double-Click on a specific Asset
Name, it will open up a form called frmAssetDetails. Basically, it repeats
the Asset Name, Category, Subcategory, Make fields but includes a picture
and some other extra details, but in a Single Form view. frmAssetDetails
includes a subform called, AssetInventory, so if you Double-Click Windows XP
Professional in frmAssets it will give you all the serial numbers and
authorization codes in a subform included in the frmAssetDetails table.
What I would like to do is when you Double-Click on the Asset Name field in
frmAssets, it will take you to different forms according to its Category or
Subcategory. So if I select Windows XP, it will open up a
frmSoftwareDetails form that will display fields only related to software or
if I select Canon PowerShot S60, it will open up a frmDigitalCamera. I also
may want to add a frmPrinters and things of that nature.
Please advise on the best way to accomplish this. I will also attach the
code I'm currently using in frmAsset for the Event Procedure in the Asset
Name field which takes me to frmAssetDetails.
Private Sub AssetName_DblClick(Cancel As Integer)
On Error GoTo Err_AssetName_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAssetDetails"
stLinkCriteria = "[AssetID]=" & Me![AssetID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_AssetName_Click:
Exit Sub
Err_AssetName_Click:
MsgBox Err.Description
Resume Exit_AssetName_Click
End Sub
Thanks for any help or advice!
I've created and I'm going to try to explain what I'm trying to do.
The main form is a Continuous Form called frmAssets. The following is an
example of how that data is entered:
Asset Name: Windows XP Professional
Category: Software
Subcategory: Operating System
Make: Microsoft Corporation
Asset Name: Canon PowerShot S60
Category: Hardware
Subcategory: Digital Camera
Make: Canon
How it is setup currently is that if you Double-Click on a specific Asset
Name, it will open up a form called frmAssetDetails. Basically, it repeats
the Asset Name, Category, Subcategory, Make fields but includes a picture
and some other extra details, but in a Single Form view. frmAssetDetails
includes a subform called, AssetInventory, so if you Double-Click Windows XP
Professional in frmAssets it will give you all the serial numbers and
authorization codes in a subform included in the frmAssetDetails table.
What I would like to do is when you Double-Click on the Asset Name field in
frmAssets, it will take you to different forms according to its Category or
Subcategory. So if I select Windows XP, it will open up a
frmSoftwareDetails form that will display fields only related to software or
if I select Canon PowerShot S60, it will open up a frmDigitalCamera. I also
may want to add a frmPrinters and things of that nature.
Please advise on the best way to accomplish this. I will also attach the
code I'm currently using in frmAsset for the Event Procedure in the Asset
Name field which takes me to frmAssetDetails.
Private Sub AssetName_DblClick(Cancel As Integer)
On Error GoTo Err_AssetName_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmAssetDetails"
stLinkCriteria = "[AssetID]=" & Me![AssetID]
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_AssetName_Click:
Exit Sub
Err_AssetName_Click:
MsgBox Err.Description
Resume Exit_AssetName_Click
End Sub
Thanks for any help or advice!