I get #Name? when assigning Public variable to Control Source of unbound Textfield of

llyal

Registered User.
Local time
Today, 18:51
Joined
Feb 1, 2000
Messages
72
I get #Name? when assigning Public variable to Control Source of unbound Textfield of Report

I am new to Access reports

My code:

Report Open()
Public PubstrTest
PubstrTest = "TEST"
End Sub

In Control Source of unbound Textfield i put PubstrTest. When i open Report i get #Name? in Textfield


What needs to be done to make Access perform? How do i handle Public variables in Reports?

Thank you!

Llyal
 
Add this line after PubstrTest = "TEST":
Me!Textfield = PubstrTest

Be sure that [Textfield] is the actual name of the field. You can't assign a variable as a Control Source, but you can set the variable as a field's value when opening a report or form.
 

Users who are viewing this thread

Back
Top Bottom