I am a VBA novice and trying to figure out the syntax for a button in the detail section of a report that will open one of two reports depending on the value of the item field in the current line
I've got the Docmd working individually for each but really struggling with the If statement.
Would really appreciate some help please
Thanks
Ian
Private Sub Command95_Click()
If [Item] contains "tile"
DoCmd.OpenReport "lot loc", acViewReport, , " lot2='" & Me!lotlink & "'"
Else
DoCmd.OpenReport "itemloc", acViewReport, , " item='" & Me!Item & "'"
Endif
End Sub