Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Formula in text box

0 views
Skip to first unread message

szag via AccessMonster.com

unread,
Jan 5, 2010, 11:34:12 AM1/5/10
to
I am having a problem with the following formula in a textbox:

=[Forms]![F_Master_Buyer]![F_AFE].[Form]![cbutJob] & " - " & [Forms]!
[F_Master_Buyer]![F_AFE]![F_AFE_subform].[Form]![Vendor_AFE]

Its basically just a label in a subform. The problem is that it will return
the desired results one time, then I will go into the dbase a different time
and it will display #error. I can't figure out the random nature of this!

Thanks for any help.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201001/1

Marshall Barton

unread,
Jan 5, 2010, 11:50:51 AM1/5/10
to
szag via AccessMonster.com wrote:

>I am having a problem with the following formula in a textbox:
>
>=[Forms]![F_Master_Buyer]![F_AFE].[Form]![cbutJob] & " - " & [Forms]!
>[F_Master_Buyer]![F_AFE]![F_AFE_subform].[Form]![Vendor_AFE]
>
>Its basically just a label in a subform. The problem is that it will return
>the desired results one time, then I will go into the dbase a different time
>and it will display #error. I can't figure out the random nature of this!


Hard to tell without more information, but with the just
above, all I can guess is if either one of the two subform's
does not have any records, #Error would be expected.

--
Marsh
MVP [MS Access]

Mike Painter

unread,
Jan 5, 2010, 7:21:41 PM1/5/10
to

"szag via AccessMonster.com" <u2885@uwe> wrote in message
news:a1a9f1bbaa783@uwe...

>I am having a problem with the following formula in a textbox:
>
> =[Forms]![F_Master_Buyer]![F_AFE].[Form]![cbutJob] & " - " & [Forms]!
> [F_Master_Buyer]![F_AFE]![F_AFE_subform].[Form]![Vendor_AFE]
>
> Its basically just a label in a subform. The problem is that it will
> return
> the desired results one time, then I will go into the dbase a different
> time
> and it will display #error. I can't figure out the random nature of this!
>
> Thanks for any help.
>
You have [F_AFE] in one case and [F_AFE_subform] in the other.

I think the questions should be why does it work rather than the opposite!


szag via AccessMonster.com

unread,
Jan 6, 2010, 8:41:32 AM1/6/10
to
Mike-

Well there are two parts to the formula:

1: [Forms]![F_Master_Buyer]![F_AFE].[Form]![cbutJob]

and

2:[Forms]![F_Master_Buyer]![F_AFE]![F_AFE_subform].[Form]![Vendor_AFE]

In #1 I am returning the "cbutJob" off the F_AFE form and I am combining that
with #2 where I am getting the "Vendor_AFE" value off of the F_AFE_Subform
(which is a subform of F_AFE).

Is there something I am doing wrong here? this is how I was instructed to get
these values.

thanks!


Mike Painter wrote:
>>I am having a problem with the following formula in a textbox:
>>

>[quoted text clipped - 8 lines]


>>
>> Thanks for any help.
>
> You have [F_AFE] in one case and [F_AFE_subform] in the other.
>
>I think the questions should be why does it work rather than the opposite!

--
Message posted via http://www.accessmonster.com

0 new messages