Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

accessing report query fields in vba

Status
Not open for further replies.

tarts

Technical User
Dec 21, 2001
2
NL
I want to use the value of a field in vba (visual basic code). I have created a query in the report, but the fields are not directly used in the report detailsection. When i am writing some code to assign a certain value (based on a field in the query:eg customer)to a valuebox, the error 'can't find value' appears.

Does anyone know what the correct syntax is. Things like [customer] or me![customer] don't work.

Thanks in advance.
 
When writing vba code in the detailsection of a report, i can not directly access a fieldvalue of the used query or table. The way i solved it was to create valueboxes in the detailsection, which i make invisible. The valueboxes are assigned to the appropiate fields of the table/query. By accessing the valueboxes i can indirectly use the values in the table/query. However this is not a very neat way of programming!

Thomas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top