I have 2 tables one btv with title tapetype and tapeid
one called type table with tapeid type and last#.
I have a form with title tapetype and tapeid fields. First i enter a title. then when i enter a tapetype i want it to generate a tapeid consisting of tapetype + last # so each tapetype will have its on set of unique numbers . Then i need to increment the last #.
I placed in the following code in the afterupdate event:
Private Sub tapetype_AfterUpdate()
If IsNull([tapetype]) Then
Else
MsgBox [type table]![Type]
If [tapetype] = [type table]![Type] Then
[btv table]![tapeid] = [type table]![Type] + [type table]![last #]
[type table]![last #] = [type table]![last #] + 1
End If
End If
End Sub
I get the right value in [tapetype] but it can't find the values in the table, [type table]![type].
Any help will be appreciated.
Thanks
Lewie
one called type table with tapeid type and last#.
I have a form with title tapetype and tapeid fields. First i enter a title. then when i enter a tapetype i want it to generate a tapeid consisting of tapetype + last # so each tapetype will have its on set of unique numbers . Then i need to increment the last #.
I placed in the following code in the afterupdate event:
Private Sub tapetype_AfterUpdate()
If IsNull([tapetype]) Then
Else
MsgBox [type table]![Type]
If [tapetype] = [type table]![Type] Then
[btv table]![tapeid] = [type table]![Type] + [type table]![last #]
[type table]![last #] = [type table]![last #] + 1
End If
End If
End Sub
I get the right value in [tapetype] but it can't find the values in the table, [type table]![type].
Any help will be appreciated.
Thanks
Lewie