Missing field? Driving me crazy!

  • Thread starter Jim In Minneapolis
  • Start date
J

Jim In Minneapolis

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
..[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
M

maxzsim

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs
 
J

Jim In Minneapolis

Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

maxzsim said:
Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



Jim In Minneapolis said:
Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
M

maxzsim

Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then

Jim In Minneapolis said:
Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

maxzsim said:
Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



Jim In Minneapolis said:
Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
M

maxzsim

Hi,

I believe it because of .[2ndMidpointPlanet].Column(1) which you have
already change its name earlier ? also make sure that the "then" is on the
same line as the "if"

after changing the above field to the correct name and if it goes thru till
the last line
i.e msgbox "Moon" when u trace thru , perhaps you could replace it with the
DLOOKUP statement you had earlier for the 2nd round of trace

rdgs,

Jim In Minneapolis said:
Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


maxzsim said:
Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then

Jim In Minneapolis said:
Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

:

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
J

Jim In Minneapolis

Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


maxzsim said:
Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then

Jim In Minneapolis said:
Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

maxzsim said:
Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
M

maxzsim

Hi,

if it fails at the 2nd "if" statement , maybe u can go to tools -> database
utilities --> compact & repair in case somehow it's corrupted

hope it can solve ur issue

rdgs

maxzsim said:
Hi,

I believe it because of .[2ndMidpointPlanet].Column(1) which you have
already change its name earlier ? also make sure that the "then" is on the
same line as the "if"

after changing the above field to the correct name and if it goes thru till
the last line
i.e msgbox "Moon" when u trace thru , perhaps you could replace it with the
DLOOKUP statement you had earlier for the 2nd round of trace

rdgs,

Jim In Minneapolis said:
Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


maxzsim said:
Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then


:

Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

:

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
J

Jim In Minneapolis

Hi again

I have cut-n-paste your code *exactly* as shown:

If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun" --> put a breakpoint
If .[MidpointPlanet].Column(1) = "Mercury" Then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
End If
End If
End If

PROBLEM: All of the "msgbox" lines are highlighted in the color RED --
indicating a syntax error. Furthermore, when I compile the module, Access
confirms that there is a "syntax" error in all of these "msgbox" lines you
have suggested.

Ideas?

Jim

maxzsim said:
Hi,

if it fails at the 2nd "if" statement , maybe u can go to tools -> database
utilities --> compact & repair in case somehow it's corrupted

hope it can solve ur issue

rdgs

maxzsim said:
Hi,

I believe it because of .[2ndMidpointPlanet].Column(1) which you have
already change its name earlier ? also make sure that the "then" is on the
same line as the "if"

after changing the above field to the correct name and if it goes thru till
the last line
i.e msgbox "Moon" when u trace thru , perhaps you could replace it with the
DLOOKUP statement you had earlier for the 2nd round of trace

rdgs,

Jim In Minneapolis said:
Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


:

Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then


:

Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

:

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
M

maxzsim

hi Jim ,

try this , have to ensure that the brackets are correct and need not put
the --> put breakpoint here w/o puting the single-quote (my apology for not
letting you know earlier

========================================
If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun"
If (.[MidpointPlanet].Column(1) = "Mercury") Then
msgbox "Mercury"
if (.[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon"
End If
End If
End If
==================================

in ms access to comment put a single-quote ' --> put comment here ...

rdgs,
Jim In Minneapolis said:
Hi again

I have cut-n-paste your code *exactly* as shown:

If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun" --> put a breakpoint
If .[MidpointPlanet].Column(1) = "Mercury" Then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
End If
End If
End If

PROBLEM: All of the "msgbox" lines are highlighted in the color RED --
indicating a syntax error. Furthermore, when I compile the module, Access
confirms that there is a "syntax" error in all of these "msgbox" lines you
have suggested.

Ideas?

Jim

maxzsim said:
Hi,

if it fails at the 2nd "if" statement , maybe u can go to tools -> database
utilities --> compact & repair in case somehow it's corrupted

hope it can solve ur issue

rdgs

maxzsim said:
Hi,

I believe it because of .[2ndMidpointPlanet].Column(1) which you have
already change its name earlier ? also make sure that the "then" is on the
same line as the "if"

after changing the above field to the correct name and if it goes thru till
the last line
i.e msgbox "Moon" when u trace thru , perhaps you could replace it with the
DLOOKUP statement you had earlier for the 2nd round of trace

rdgs,

:

Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


:

Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then


:

Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

:

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
J

Jim In Minneapolis

Hi again.

I appreciate your patience, but this is not working at all.

I inserted the new code you supplied below, saved the module, and executed
the report.

I immediately get the exact same error message . . . nothing has changed.

Jim

maxzsim said:
hi Jim ,

try this , have to ensure that the brackets are correct and need not put
the --> put breakpoint here w/o puting the single-quote (my apology for not
letting you know earlier

========================================
If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun"
If (.[MidpointPlanet].Column(1) = "Mercury") Then
msgbox "Mercury"
if (.[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon"
End If
End If
End If
==================================

in ms access to comment put a single-quote ' --> put comment here ...

rdgs,
Jim In Minneapolis said:
Hi again

I have cut-n-paste your code *exactly* as shown:

If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun" --> put a breakpoint
If .[MidpointPlanet].Column(1) = "Mercury" Then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
End If
End If
End If

PROBLEM: All of the "msgbox" lines are highlighted in the color RED --
indicating a syntax error. Furthermore, when I compile the module, Access
confirms that there is a "syntax" error in all of these "msgbox" lines you
have suggested.

Ideas?

Jim

maxzsim said:
Hi,

if it fails at the 2nd "if" statement , maybe u can go to tools -> database
utilities --> compact & repair in case somehow it's corrupted

hope it can solve ur issue

rdgs

:

Hi,

I believe it because of .[2ndMidpointPlanet].Column(1) which you have
already change its name earlier ? also make sure that the "then" is on the
same line as the "if"

after changing the above field to the correct name and if it goes thru till
the last line
i.e msgbox "Moon" when u trace thru , perhaps you could replace it with the
DLOOKUP statement you had earlier for the 2nd round of trace

rdgs,

:

Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


:

Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then


:

Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

:

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
M

maxzsim

sorry Jim , do you mean the same error msg as in it's the "Syntax" error
again ? or the first error when u first posted ur issue to the newsgroup ?

are you able to compile now ?
or you can remove the msgbox lines and put a break point on the first if
statement (using <F9>)and then use <F8> to trace thru but u need to put it as
a function in the module before u can do a standalone trace w/o having to go
thru ur forms

rdgs

Jim In Minneapolis said:
Hi again.

I appreciate your patience, but this is not working at all.

I inserted the new code you supplied below, saved the module, and executed
the report.

I immediately get the exact same error message . . . nothing has changed.

Jim

maxzsim said:
hi Jim ,

try this , have to ensure that the brackets are correct and need not put
the --> put breakpoint here w/o puting the single-quote (my apology for not
letting you know earlier

========================================
If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun"
If (.[MidpointPlanet].Column(1) = "Mercury") Then
msgbox "Mercury"
if (.[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon"
End If
End If
End If
==================================

in ms access to comment put a single-quote ' --> put comment here ...

rdgs,
Jim In Minneapolis said:
Hi again

I have cut-n-paste your code *exactly* as shown:

If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun" --> put a breakpoint
If .[MidpointPlanet].Column(1) = "Mercury" Then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
End If
End If
End If

PROBLEM: All of the "msgbox" lines are highlighted in the color RED --
indicating a syntax error. Furthermore, when I compile the module, Access
confirms that there is a "syntax" error in all of these "msgbox" lines you
have suggested.

Ideas?

Jim

:

Hi,

if it fails at the 2nd "if" statement , maybe u can go to tools -> database
utilities --> compact & repair in case somehow it's corrupted

hope it can solve ur issue

rdgs

:

Hi,

I believe it because of .[2ndMidpointPlanet].Column(1) which you have
already change its name earlier ? also make sure that the "then" is on the
same line as the "if"

after changing the above field to the correct name and if it goes thru till
the last line
i.e msgbox "Moon" when u trace thru , perhaps you could replace it with the
DLOOKUP statement you had earlier for the 2nd round of trace

rdgs,

:

Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


:

Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then


:

Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

:

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
J

Jim In Minneapolis

Thanks again. I was referring to my original complaint ("can not find
field"). Yes, your code can compile ok.

Well, I think I will have to give up on this. But I do appreciate your
kindness try ing to help.

Bye

Jim

maxzsim said:
sorry Jim , do you mean the same error msg as in it's the "Syntax" error
again ? or the first error when u first posted ur issue to the newsgroup ?

are you able to compile now ?
or you can remove the msgbox lines and put a break point on the first if
statement (using <F9>)and then use <F8> to trace thru but u need to put it as
a function in the module before u can do a standalone trace w/o having to go
thru ur forms

rdgs

Jim In Minneapolis said:
Hi again.

I appreciate your patience, but this is not working at all.

I inserted the new code you supplied below, saved the module, and executed
the report.

I immediately get the exact same error message . . . nothing has changed.

Jim

maxzsim said:
hi Jim ,

try this , have to ensure that the brackets are correct and need not put
the --> put breakpoint here w/o puting the single-quote (my apology for not
letting you know earlier

========================================
If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun"
If (.[MidpointPlanet].Column(1) = "Mercury") Then
msgbox "Mercury"
if (.[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon"
End If
End If
End If
==================================

in ms access to comment put a single-quote ' --> put comment here ...

rdgs,
:

Hi again

I have cut-n-paste your code *exactly* as shown:

If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun" --> put a breakpoint
If .[MidpointPlanet].Column(1) = "Mercury" Then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
End If
End If
End If

PROBLEM: All of the "msgbox" lines are highlighted in the color RED --
indicating a syntax error. Furthermore, when I compile the module, Access
confirms that there is a "syntax" error in all of these "msgbox" lines you
have suggested.

Ideas?

Jim

:

Hi,

if it fails at the 2nd "if" statement , maybe u can go to tools -> database
utilities --> compact & repair in case somehow it's corrupted

hope it can solve ur issue

rdgs

:

Hi,

I believe it because of .[2ndMidpointPlanet].Column(1) which you have
already change its name earlier ? also make sure that the "then" is on the
same line as the "if"

after changing the above field to the correct name and if it goes thru till
the last line
i.e msgbox "Moon" when u trace thru , perhaps you could replace it with the
DLOOKUP statement you had earlier for the 2nd round of trace

rdgs,

:

Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


:

Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then


:

Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

:

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
W

Wayne Morgan

Do you have a query between the table and the report? If so, is the field
included in the query's output?

Where is this code located? Is it in the report or in a form calling the
report? If its not on the report, does this field exist on the form?

Are the other two fields bound to controls on the report but this one isn't?
If so, you may need to add a hidden textbox to the report and bind it to the
field.

Since you are referring to Column(1), it appears that it may be a control.
Is it a combo box or listbox? You are starting the lines with a period, is
the If statement within a "With" statement?
 
M

maxzsim

Jim ,

ok but it starts saying the "missing field " error at the statement below ?
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")

perhaps try to cpmact & repair

rdgs




Jim In Minneapolis said:
Thanks again. I was referring to my original complaint ("can not find
field"). Yes, your code can compile ok.

Well, I think I will have to give up on this. But I do appreciate your
kindness try ing to help.

Bye

Jim

maxzsim said:
sorry Jim , do you mean the same error msg as in it's the "Syntax" error
again ? or the first error when u first posted ur issue to the newsgroup ?

are you able to compile now ?
or you can remove the msgbox lines and put a break point on the first if
statement (using <F9>)and then use <F8> to trace thru but u need to put it as
a function in the module before u can do a standalone trace w/o having to go
thru ur forms

rdgs

Jim In Minneapolis said:
Hi again.

I appreciate your patience, but this is not working at all.

I inserted the new code you supplied below, saved the module, and executed
the report.

I immediately get the exact same error message . . . nothing has changed.

Jim

:

hi Jim ,

try this , have to ensure that the brackets are correct and need not put
the --> put breakpoint here w/o puting the single-quote (my apology for not
letting you know earlier

========================================
If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun"
If (.[MidpointPlanet].Column(1) = "Mercury") Then
msgbox "Mercury"
if (.[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon"
End If
End If
End If
==================================

in ms access to comment put a single-quote ' --> put comment here ...

rdgs,
:

Hi again

I have cut-n-paste your code *exactly* as shown:

If (.[Planet Number].Column(1) = "Sun") Then
msgbox "Sun" --> put a breakpoint
If .[MidpointPlanet].Column(1) = "Mercury" Then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
End If
End If
End If

PROBLEM: All of the "msgbox" lines are highlighted in the color RED --
indicating a syntax error. Furthermore, when I compile the module, Access
confirms that there is a "syntax" error in all of these "msgbox" lines you
have suggested.

Ideas?

Jim

:

Hi,

if it fails at the 2nd "if" statement , maybe u can go to tools -> database
utilities --> compact & repair in case somehow it's corrupted

hope it can solve ur issue

rdgs

:

Hi,

I believe it because of .[2ndMidpointPlanet].Column(1) which you have
already change its name earlier ? also make sure that the "then" is on the
same line as the "if"

after changing the above field to the correct name and if it goes thru till
the last line
i.e msgbox "Moon" when u trace thru , perhaps you could replace it with the
DLOOKUP statement you had earlier for the 2nd round of trace

rdgs,

:

Hi again

I've cut-n-paste the argument you've kindly supplied me . . . but I get an
error message when it is executed: "Syntax error"

Jim


:

Hi ,

not really sure what might be the problem but have u traced thru to see
where it fails ? i.e at the .[2ndMidpointPlanet].Column(1) = "Mercury" line
or at the Dlookup statement (which i am suspecting)

i can suggest the following and hopefully it could be useful to you

If (.[Planet Number].Column(1) = "Sun") then
msgbox "Sun" --> put a breakpoint
if .[2ndMidpointPlanet].Column(1) = "Mercury" then
msgbox "Mercury" --> put a breakpoint
if .[Aspected Planet Number].Column(1) = "Moon") Then
msgbox "Moon" --> put a breakpoint
endif
endif
endif

rdgs
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then


:

Hi, rdgs. Thanks for your help.

Ok. I've tried renaming the field to [MidpointPlanet] in the table and in
the module.

But nothing changes . . . I get the same error message.

Ideas?

Jim

:

Hi ,

Could you try renaming that filed , i.e don't use a numeric infront ?

rdgs



:

Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
J

Jim In Minneapolis

Hi Wayne

Thanks for jumping in to help me. I appreciate it.

Wayne Morgan said:
Do you have a query between the table and the report? If so, is the field
included in the query's output?

No. There is no query involved at all.
Where is this code located? Is it in the report or in a form calling the
report? If its not on the report, does this field exist on the form?

The code is in a module. The module is called from the body of the report's
"On Format" field
Are the other two fields bound to controls on the report but this one isn't?
If so, you may need to add a hidden textbox to the report and bind it to the
field.

No. None of the fields in question is bound to controls on the report.
Rather, the data is displayed/printed in an unbound text box on the report.
Since you are referring to Column(1), it appears that it may be a control.
Is it a combo box or listbox? You are starting the lines with a period, is
the If statement within a "With" statement?

I don't recall the original reason why I did it this way. (I got help from
Microsoft tech on the phone years ago -- when they were still giving free
tech support! Those were the days, gosh.). But, to answer the question,
the reason for all that is I think that this is a 'lookup' function. The
original field value of the planet name, for instance, is a numeric digit
(i.e. "1" for the Sun, or "2" for the Moon). The lookup references another
table, which then exchanges "1" for the text word "Sun" etc.)

The thing that's nuts about this situation, is that I can't find any
difference in the configuration of these 3 fields. For the life of me, they
all seem identically configured . . . yet (obviously) one of them is working
very differently! Ugh.

Thanks

Jim
--
Wayne Morgan
MS Access MVP


Jim In Minneapolis said:
Hi. I'm about to scream! Can't figure this one. Can anybody help?

Here is my module argument:

If (.[Planet Number].Column(1) = "Sun" And
.[2ndMidpointPlanet].Column(1) = "Mercury" And .[Aspected Planet
Number].Column(1) = "Moon") Then
Reports![ASTROLOGICAL FORECAST REPORT]!Interpretation =
DLookup("[PositiveNegative] & ' ' & [Description]", "[MIDPOINT PAIRS
TABLE]", "[AutoNumber]=131")
End If

The module is supposed to insert data from [MIDPOINT PAIRS TABLE] into
[ASTROLOGICAL FORECAST REPORT].

But I keep getting this error message when trying to print:

"Microsoft Access can't find the field '2ndMidpointPlanet' referred to in
your expression"


I have double-checked the table [ASTROLOGICAL FORECAST] -- which is the
source for the report. The field IS there, and it is spelled correctly
[2ndMidpointPlanet].

Why doesn't the module recognize it? Any thoughts?

NOTE: When I delete the [2ndMidpointPlanet] requirement, the arguement
DOES
recognize the other 2 fields [Planet Number] and [Aspected Planet Number].
Its only this [2ndMidpointPlanet] field that's making me tear out my hear
(and I ain't got much hair left!!)

I sure appreciate anybody's help

Thanks

Jim
 
W

Wayne Morgan

In that case, the only thing I see is that you've used spaces in all of the
names except the one that doesn't work. Is that correct or does the field
name in the table have spaces in it?
 
J

Jim In Minneapolis

Thanks Wayne

I appreciate your help. Well, that's not the problem, because I already
'tested' changing the name to "midpointplanets" (in both module and
table)--but no change.

So, I think I'll just give up at this point.

But I do appreciate your kindness in offering to help.

Bye

Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top