Unfortunately, I get this error instead:
"Property let procedure not defined and property get procedure did not return an object."
I suspect the problem lies in the mutliple "ElseIf" statements.
Here's the code:
Expand|Select|Wrap|Line Numbers
- Dim stDocName As String
- Dim stLinkCriteria As String
- Dim stCategory As String
- stCategory = Me.AssetList.Column(0)
- If stCategory = "Computers" Then
- stDocName = "AcctgComputers"
- ElseIf stCategory = "Cameras" Then stDocName = "AcctgDECameras"
- ElseIf stCategory = "Monitors" Then stDocName = "AcctgDEMonitors"
- ElseIf stCategory = "MFCs" Then stDocName = "AcctgDEMFCs"
- ElseIf stCategory = "Printers" Then stDocName = "AcctgDEPrinters"
- ElseIf stCategory = "Docks" Then stDocName = "AcctgDEDocks"
- ElseIf stCategory = "PDAs" Then stDocName = "AcctgDEPDAs"
- ElseIf stCategory = "Other DE" Then stDocName = "AcctgDEOthers"
- End If
- stLinkCriteria = "[SerialNo]=" & "'" & Me![AssetList]!Column(1) & "'"
- DoCmd.OpenForm stDocName, , , stLinkCriteria