Cosmonaut_99
Registered User.
- Local time
- Today, 02:29
- Joined
- Oct 24, 2012
- Messages
- 15
Hi,
I'm trying to run an if statment, on the records in a field (called "Current_Month"), in an existing table called ""Current_Months_Lag1_Data".
The IF statements work fine - and simply perform a different action for different data in "Current_Month".
I am having problems referring to "Current_Month", where I keep getting 424 (Object required) and 3420 (Object invalid) error messages, on the last line of code.
I'm stumped as to how to resolved this, (I have defined & identified the table in which the field is located, yet somehow cannot identify the field within that table).
(I've already tried searching the web for similar problems under error messages 424 & 3420).
I'd appreciate any suggested solutions.
------------------------------------------------------------------
Function LAG_Forecast_03()
Dim dbs As Database
Set dbs = CurrentDb
Dim Tbl As TableDef
Set Tbl = CurrentDb.TableDefs("Current_Months_Lag1_Data")
Dim FLD As Field
Set FLD = Tbl![Current_Month]
I'm trying to run an if statment, on the records in a field (called "Current_Month"), in an existing table called ""Current_Months_Lag1_Data".
The IF statements work fine - and simply perform a different action for different data in "Current_Month".
I am having problems referring to "Current_Month", where I keep getting 424 (Object required) and 3420 (Object invalid) error messages, on the last line of code.
I'm stumped as to how to resolved this, (I have defined & identified the table in which the field is located, yet somehow cannot identify the field within that table).
(I've already tried searching the web for similar problems under error messages 424 & 3420).
I'd appreciate any suggested solutions.
------------------------------------------------------------------
Function LAG_Forecast_03()
Dim dbs As Database
Set dbs = CurrentDb
Dim Tbl As TableDef
Set Tbl = CurrentDb.TableDefs("Current_Months_Lag1_Data")
Dim FLD As Field
Set FLD = Tbl![Current_Month]