pr3mium
Posts: 31
|
| Posted: 12/22/2004, 1:33 AM |
|
hi,
I'm trying to create an editable grid, where user can add times in format dd.mm.yy HH:nn
I use one 'datetime' field in MSSQL database table. On a grid I created 3 fields for creating the value for time:
1. date (textbox, dd.mm.yyyy)
2. hour (listbox)
3. minutes (listbox)
I also added a hidden field, which finally should get the joined string of date, hour and minute fields like that:
"date hour:minute". I've used this method in record form in before validation event and it works there:
a = times.datefld.value
If times.hourfld.value <> "" Then
a = a & " " & times.hourfld.value
End If
If times.minfld.value <> "" Then
If times.hourfld.value <> "" Then
a = a & ":"
a = a & times.minfld.value
End If
Else
If times.hourfld.value <> "" Then
a = a & ":00"
Else
a = a & " 00:00"
End If
End If
times.timefld.value = a
In editable grid it doesn't work, and I've tried out using the code in other events as well. times.timefld.value always stays empty.
Any ideas?
Thanks in advance,
Christjan
|