essaytee
Need a good one-liner.
- Local time
- Tomorrow, 04:54
- Joined
- Oct 20, 2008
- Messages
- 531
Preamble: Users will be able to fill in a spreadsheet (that is downloaded from the Access application), and eventually import the data from the spreadsheet into a temporary table and then eventually into the live table on the network. I'm still in draft/development mode with this feature.
I have a routine whereby the data in the spreadsheet is checked, before importing into the temporary table. On any errors detected, they are written to a text file, the user notified for correction, and the process halts.
I'm having issues with validating 'time' values. Here is a snippet of code where I check for invalid dates, which works:
It's been quite a while since I last dabbled in coding.
How do I do similar for 'time' values? If need be, I can suggest, that times be entered in 24 hr format "14:10".
I have a routine whereby the data in the spreadsheet is checked, before importing into the temporary table. On any errors detected, they are written to a text file, the user notified for correction, and the process halts.
I'm having issues with validating 'time' values. Here is a snippet of code where I check for invalid dates, which works:
Code:
Case dbDate
If Not IsEmpty(Sheet1.Cells(r, c)) Then
If Not IsDate(Sheet1.Cells(r, c)) Then
ReDim Preserve strErrorArray(x)
strErrorArray(x) = "Row " & Str(r) & " Column " & Str(c) & " --- Invalid DATE: Data is: " & Sheet1.Cells(r, c)
x = x + 1
End If
End If
It's been quite a while since I last dabbled in coding.
How do I do similar for 'time' values? If need be, I can suggest, that times be entered in 24 hr format "14:10".