I know, i've looked around a bit and I'm not sure how to grab a substing. Maybe there's an easier way to do what i want. I probably could use a little guidance. I made the combobox, but I wasnt sure the best way to translate their selection to the 6 digit date, ie. "January 1, 2014 123112"...i would want to store the 6 digit date into a string for placement on the session screen.
If there's a easier way to assign the variable the six digit date? The 6 digit date does not need to be in the combobox, i.e. when they select "January 1, 2014", a variable would automatically be populated with "123112". That would look cleaner.
I don't know enough to know where to go here.
Thanks in advance.
If there's a easier way to assign the variable the six digit date? The 6 digit date does not need to be in the combobox, i.e. when they select "January 1, 2014", a variable would automatically be populated with "123112". That would look cleaner.
I don't know enough to know where to go here.
Thanks in advance.
Code:
Dim cboReportDate (12) as string
cboReportDate(0) = "January 1, 2014 123112"
cboReportDate(1) = "February 1, 2014 013113"
cboReportDate(2) = "March 1, 2014 022813"
cboReportDate(3) = "April 1, 2014 033113"
cboReportDate(4) = "May 1, 2014 043013"
cboReportDate(5) = "June 1, 2014 053113"
cboReportDate(6) = "July 1, 2014 063013"
cboReportDate(7) = "August 1, 2014 073113"
cboReportDate(8) = "September 1, 2014 083113"
cboReportDate(9) = "October 1, 2014 093013"
cboReportDate(10) = "November 1, 2014 103113"
cboReportDate(11) = "December 1, 2014 113013"
dim yourselection as string
Begin Dialog dlgOptions 10, 28, 140, 140, " ---Assignee---"
OkButton 80, 17, 45, 20,.btnOK
DropComboBox 10, 20, 60, 20, cboReportDate(), .cboReportDate
cancelbutton 80, 45, 45, 20, .btnCancel
End Dialog
iDone = FALSE
While (iDone = FALSE) 'This is what this does
Dim dlgVar as dlgOptions
nRet = Dialog(dlgVar)
Select Case nRet
Case -1 ' -1 is returned if the user chose OK
'msgbox nRet
iDone = TRUE
Case 0 ' 0 is returned if the user chose Cancel
'msgbox nRet
Exit sub
End Select
Wend
YourSelection = dlgvar.cboreportdate
'dim yourselection as strDate
' msgbox yourselection(18, 6)