H
Henro
SELECT [NONDEALgerelateerd Query].Begindatum, [NONDEALgerelateerd
Query].Engineer, [NONDEALgerelateerd Query].AgendaItem, [NONDEALgerelateerd
Query].Omschrijving
FROM [NONDEALgerelateerd Query]
WHERE ((([NONDEALgerelateerd Query].Begindatum)=Date()+3))
Can I use the above SQL statement in VBA?
Something like this?
Private Sub Form_Close()
Dim FirstDate As Date
Dim IntervalType As String
Dim Number As Integer
Dim Msg
Dim Voorwaarde
FirstDate = Date
IntervalType = "d"
Number = 3
Msg = "Er is nog geen concrete planning voor " & DateAdd(IntervalType,
Number, FirstDate)
Plusdate = DateAdd(IntervalType, Number, FirstDate)
Voorwaarde = 'SQL STATEMENT'
With Me.RecordsetClone
If Voorwaarde = Empty Then
MsgBox Msg
.AddNew
.Omschrijving = "Nog geen concrete planning"
.Engineer = Me.Engineer
.Begindatum = Plusdate
MsgBox Msg
.Update
Else: End
End If
End With
End Sub
I need the output of above query to be the value examined in the If...
Then... statement.
Any idea's, suggestions?
TIA Henro
Query].Engineer, [NONDEALgerelateerd Query].AgendaItem, [NONDEALgerelateerd
Query].Omschrijving
FROM [NONDEALgerelateerd Query]
WHERE ((([NONDEALgerelateerd Query].Begindatum)=Date()+3))
Can I use the above SQL statement in VBA?
Something like this?
Private Sub Form_Close()
Dim FirstDate As Date
Dim IntervalType As String
Dim Number As Integer
Dim Msg
Dim Voorwaarde
FirstDate = Date
IntervalType = "d"
Number = 3
Msg = "Er is nog geen concrete planning voor " & DateAdd(IntervalType,
Number, FirstDate)
Plusdate = DateAdd(IntervalType, Number, FirstDate)
Voorwaarde = 'SQL STATEMENT'
With Me.RecordsetClone
If Voorwaarde = Empty Then
MsgBox Msg
.AddNew
.Omschrijving = "Nog geen concrete planning"
.Engineer = Me.Engineer
.Begindatum = Plusdate
MsgBox Msg
.Update
Else: End
End If
End With
End Sub
I need the output of above query to be the value examined in the If...
Then... statement.
Any idea's, suggestions?
TIA Henro