I have a module called GetDocIndex which calculates a sequential number in a
control called CommDocNbrtxt. On the BeforeUpdate property of the form I
have the following code
Private Sub Form_BeforeUpda te(Cancel As Integer)[color=blue]
>
> If Len(Nz(Me.CommD ocNbrtxt, "")) = 0 Then
> Me.CommDocNbrtx t.Value = GetDocIndex
> End If[/color]
The control isn't updated when I open the form and when I save the form I
get a message that points to this code that says Compile error Expected
variable or function not module. If I put the module code in the form module
it doesn't work either.
Can anyone help here?
TIA
control called CommDocNbrtxt. On the BeforeUpdate property of the form I
have the following code
Private Sub Form_BeforeUpda te(Cancel As Integer)[color=blue]
>
> If Len(Nz(Me.CommD ocNbrtxt, "")) = 0 Then
> Me.CommDocNbrtx t.Value = GetDocIndex
> End If[/color]
The control isn't updated when I open the form and when I save the form I
get a message that points to this code that says Compile error Expected
variable or function not module. If I put the module code in the form module
it doesn't work either.
Can anyone help here?
TIA
Comment