Code Syntax question

Hi Dustin,

Try...

edv.dataView(edv.Row)("Date01") = DateAdd(DateInterval.Year, 1, DateValue(edv.dataView(edv.Row)("Date03"))

HTH,
Ross

--- In vantage@yahoogroups.com, melissa hietala <kevmel822@...> wrote:
>
> IÂ am creating a customization and what I need to happen is that when the user
> changes the value of the "PREmployee.Date03" field, I need the
> "PREmployee.Date01" field to be automatically set to 1 year ahead of the
> "Date03" value. Im struggling to find a way to make this work. Below is what I
> have so far. Any thoughts on the syntax to perform this?
>
> Thank you
>
> Dustin Biniek
>
> Â
> Private Sub PREmpMas_AfterFieldChange(ByVal sender As object, ByVal args As
> DataColumnChangeEventArgs) Handles PREmpMas_Column.ColumnChanged
> Â Â '// ** Argument Properties and Uses **
> Â Â '// args.Row("[FieldName]")
> Â Â '// args.Column, args.ProposedValue, args.Row
> Â Â '
> Â Â 'Add Event Handler Code
> Â Â '
> Â Â Â Â Â Â Â Dim edv As EpiDataView = CType(oTrans.EpiDataViews("PREmployee"),
> EpiDataView)
>
> Â Â Select Case args.Column.ColumnName
> Â
> Â Â Â Case "Date03"
> Â Â Â Â Â Â Â Â edv.dataView(edv.Row)("Date01") = edv.dataView(edv.Row)("Date03")Â +
> 365?????
>
> Â Â Â Case Else
> Â
> Â Â End Select
> Â
> Â End Sub
>
>
>
>
> [Non-text portions of this message have been removed]
>
IÂ am creating a customization and what I need to happen is that when the user
changes the value of the "PREmployee.Date03" field, I need the
"PREmployee.Date01" field to be automatically set to 1 year ahead of the
"Date03" value. Im struggling to find a way to make this work. Below is what I
have so far. Any thoughts on the syntax to perform this?

Thank you

Dustin Biniek

Â
Private Sub PREmpMas_AfterFieldChange(ByVal sender As object, ByVal args As
DataColumnChangeEventArgs) Handles PREmpMas_Column.ColumnChanged
  '// ** Argument Properties and Uses **
  '// args.Row("[FieldName]")
  '// args.Column, args.ProposedValue, args.Row
  '
  'Add Event Handler Code
  '
       Dim edv As EpiDataView = CType(oTrans.EpiDataViews("PREmployee"),
EpiDataView)

  Select Case args.Column.ColumnName
Â
   Case "Date03"
        edv.dataView(edv.Row)("Date01") = edv.dataView(edv.Row)("Date03") +
365?????

   Case Else
Â
  End Select
Â
 End Sub




[Non-text portions of this message have been removed]