Hi,
I've a listbox (lstTAssignDt) to hold a number of date and when a date is selected. It will be assigned to dTeach_PIP (type Date).
...
For Each varItm In lstTAssignDt.ItemsSelected
dTeach_PIP = Format(lstTAssignDt.ItemData(varItm), "dd\-mmm\-yyyy")
Next varItm
...
However, when I do a DLookup with this dTeach_PIP and the rest parameters, I go the display as at the immediate windows
iSession = DLookup("[Session]", "tblTeachTT_PIP", "[AcademicYr] = " & iApptYr & " AND [PIPYr] = " & iPIPYr & " AND [dtTeach] = #" & dTeach_PIP & "#")
Immediate windows
? dTeach_PIP
12:00:00 AM
I expected a medium date, e.g. 27-09-2017, is received but it turns up a time. What do you suggest to do for a medium date.
Thank you.
NT100
I've a listbox (lstTAssignDt) to hold a number of date and when a date is selected. It will be assigned to dTeach_PIP (type Date).
...
For Each varItm In lstTAssignDt.ItemsSelected
dTeach_PIP = Format(lstTAssignDt.ItemData(varItm), "dd\-mmm\-yyyy")
Next varItm
...
However, when I do a DLookup with this dTeach_PIP and the rest parameters, I go the display as at the immediate windows
iSession = DLookup("[Session]", "tblTeachTT_PIP", "[AcademicYr] = " & iApptYr & " AND [PIPYr] = " & iPIPYr & " AND [dtTeach] = #" & dTeach_PIP & "#")
Immediate windows
? dTeach_PIP
12:00:00 AM
I expected a medium date, e.g. 27-09-2017, is received but it turns up a time. What do you suggest to do for a medium date.
Thank you.
NT100