G
Guest
I have a form with with about 35 controls on the form. The datatype of the
forms are Text type, Date type and Number type.
Now while posting data, the user does get all the information so he only
able to post some of the control and many of them are blank.
I want to post the value to the blank fields as follows, the below codes I
have just written to make better understand my need, I know its not correct..
I want to run the Code just before it moves to next record:
Dim ctl as Control
For Each ctl In Forms(ActiveForm).Controls
If ctl.DataType = Text And Is Null Then
ctl.value = "No Info"
ElseIf ctl.DataType = Number And Is Null Then
ctl.value = 0
ElseIf ctl.DataType = Date And Is Null Then
ctl.value = Now()
End If
Next
Requesting the Professionals to kindly correct my above code, so that I can
complete this code to use it.
Regards.
Irshad.
forms are Text type, Date type and Number type.
Now while posting data, the user does get all the information so he only
able to post some of the control and many of them are blank.
I want to post the value to the blank fields as follows, the below codes I
have just written to make better understand my need, I know its not correct..
I want to run the Code just before it moves to next record:
Dim ctl as Control
For Each ctl In Forms(ActiveForm).Controls
If ctl.DataType = Text And Is Null Then
ctl.value = "No Info"
ElseIf ctl.DataType = Number And Is Null Then
ctl.value = 0
ElseIf ctl.DataType = Date And Is Null Then
ctl.value = Now()
End If
Next
Requesting the Professionals to kindly correct my above code, so that I can
complete this code to use it.
Regards.
Irshad.