Lifeseeker
Registered User.
- Local time
- Today, 13:53
- Joined
- Mar 18, 2011
- Messages
- 273
Hi there,
I have a table onto which i would like to add new column based on a set of if statements. (to assign weekly dates)
this is only a portion of the code, but when I clicked on run, it gives me "external name not defined error".
can anybody assist? Is there anything that I did wrong?
I put the code in the module.
Thanks
I have a table onto which i would like to add new column based on a set of if statements. (to assign weekly dates)
this is only a portion of the code, but when I clicked on run, it gives me "external name not defined error".
Code:
Option Compare Database
Option Explicit
Public Sub AssignWeekly()
'declares weekly column as a new variable
Dim Client_Weekly_1213 As Integer
'starts coding in weekly
If [P3].[intake date] >= #4/1/2012# And [P3].[intake date] < #4/8/2012# Then
Client_Weekly.Value = 1
End If
If [P3].[intake date] >= #4/8/2012# And [P3].[intake date] < #4/15/2012# Then
Client_Weekly.Value = 2
End If
can anybody assist? Is there anything that I did wrong?
I put the code in the module.
Thanks