Variable in IDEA editor
Forums
Hey, guys, I tried many things and didnt find the answer.
My problem is that I want to get a value from an InputDialog and assign it to a variable: so far so good.
Now I want to use it in the equation editor. Unfortunately, I cant sort out the double quotion marks in a right way.
This is the code that I'd like having to work:
0) this is the inputbox:
Dim eingabe As String
eingabe = InputBox("Bitte geben Sie hier das Rückrechnungsdatum ein", "Rückrechnung", "")
MsgBox "Datum zur Rückrechnung: " & eingabe
-------------------------------------------------------
1) the code of a normal extraction with a typed string value:
Set db = Client.OpenDatabase("Datumsabweichungen Beleg- und Buchungsdatum.IMD")
Set task = db.Extraction
task.IncludeAllFields
dbName = "EXTRAKTION1.IMD"
task.AddExtraction dbName, "", "BLDAT >= ""20200101"""
task.CreateVirtualDatabase = False
task.PerformTask 1, db.Count
Set task = Nothing
Set db = Nothing
Client.OpenDatabase (dbName)
-------------------------------------------------------
2) the code with the variable in the equation:
I just need this variable to be in there:
Set db = Client.OpenDatabase("Datumsabweichungen Beleg- und Buchungsdatum.IMD")
Set task = db.Extraction
task.IncludeAllFields
dbName = "EXTRAKTION2.IMD"
task.AddExtraction dbName, "", "BLDAT >= " &"""& eingabe & """
task.CreateVirtualDatabase = False
task.PerformTask 1, db.Count
Set task = Nothing
Set db = Nothing
Client.OpenDatabase (dbName)
Thanks in advance and much appreciated!
This should work:
This should work:
"BLDAT >= """ & eingabe & """"
another way to write it is the following using the chr(34) which is the "
"BLDAT >= " & Chr(34) & eingabe & Chr(34)