mattstrachan
Registered User.
- Local time
- Yesterday, 21:04
- Joined
- Feb 22, 2013
- Messages
- 31
I have been using the syntax:
DoCmd.OpenReport "Label_Single", acViewPreview, , strWhere
This has worked for the last month. Suddenly I am getting an error 3615 Type Mismatch in expression. I have not changed anything in this code for over a month. Here is the full code:
Private Sub btnRetailLabel_Click()
Dim strWhere As String
If Forms!Product!Qty_Type = "Single Stone" Then 'generate 1x1 small label
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ProductID] = " & Me.[ProductID]
DoCmd.OpenReport "Label_SingleRetail", acPreview, , strWhere
End If
End If
End Sub
Can anyone help me figure out why this is suddenly not working? If I made edits to the Label_Single would that cause this?
DoCmd.OpenReport "Label_Single", acViewPreview, , strWhere
This has worked for the last month. Suddenly I am getting an error 3615 Type Mismatch in expression. I have not changed anything in this code for over a month. Here is the full code:
Private Sub btnRetailLabel_Click()
Dim strWhere As String
If Forms!Product!Qty_Type = "Single Stone" Then 'generate 1x1 small label
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[ProductID] = " & Me.[ProductID]
DoCmd.OpenReport "Label_SingleRetail", acPreview, , strWhere
End If
End If
End Sub
Can anyone help me figure out why this is suddenly not working? If I made edits to the Label_Single would that cause this?