| re: Referencing a form within a report
James Fortune wrote:
[color=blue]
> aw <aw@spam.is.nul> wrote in message
> news:<c666ddb6b9632b8d0f34be3504593e70@news.1usene t.com>...[color=green]
>> Hi MVP's,
>>
>> I was trying to write an assignment declaration within my report that
>> would reference an active form:
>>
>> Private Sub Report_Activate()
>> Dim src AS Forms
>> Set src = [MyForm]
>>
>> TextBox = src![Subject1] & " / " & src![Subject2]
>>
>> (I was hoping this would be better than typing
>> 'Forms![MyForm]![Subject1]' some 20 times!)
>>
>> Alas, this only produces error messages such as "Data missmatch".
>>
>> Any information will be greatly appreciated...[/color]
>
> I had success with:
>
> Dim src As Form
>
> Set src = Forms![MyForm]
> With src
> TextBox = ![Subject1].Value & " / " & ![Subject2].Value
> End With
>
> James A. Fortune[/color]
Thanks James, I'll give it a go...
--
Thanks a million! |