speakers_86
Registered User.
- Local time
- Today, 11:35
- Joined
- May 17, 2007
- Messages
- 1,919
I am getting this error, even though everything should be considered string. I suppose it is probably a problem with quotes. The error is at SER= in the public function.
Code:
Public Function FullSer()
Dim SER As String
SER = "000-" And Suffix And "Q" And vyear
MsgBox FullSer
End Function
'Private Sub Form_Current()
'Me.Combo2.DefaultValue.ItemData (0)
'End Sub
Private Sub Text5_Click()
'Setfocus so that the cursor doesnt stay on the control
Me.Combo2.SetFocus
'Determine the year for purposes of determining the final ser number
Dim vyear As String
If Nz(Me.Combo2, Right(Date, 4)) = Right(Date, 4) Then
vyear = ""
Else
vyear = "(" & Right(Me.Combo2, 2) & ")"
End If
'If necessary, creates a new series. One series for each year.
If IsNull(DLookup("[serseries]", "qryQuarterlySerCheck", "[SeriesDate] =" & [Combo2])) Then
Call SeriesCheck
End If
'Determine if new suffix needs to be created
Suffix = "01"
Call FullSer
If IsNull(DLookup("[fullser]", "qryser2", "[fullser]='" & "ser" & "'")) Then
Call SuffixCheck
End If
'Open frmSER
'DoCmd.OpenForm "frmser", , , "[fullser]= '000-01Q'" & vyear
DoCmd.OpenForm "frmser", , , "[fullser]= '" & "ser" & "'"
'Sets combo 144 to only quarterly
Call ReportSQL
[Forms]![frmser].TabCtl176.Pages.Item("page186").SetFocus
End Sub