Dec 20 2004, 10:07 AM
I have a query that uses some OLD data that needs to be cleaned up for a report. My report is based of a query that contains this data like BillToCustomerName, Address, Contact. I want to trim spaces, convert some of the fields to proper case and clean up some for display purposes.
If I don't put a field from the query on the form how can I use it in code behind the form. I've tried things like strTemp= Me![CustomerBillToName] but then I get error that Access can't find that field.
Do I have to put it on the form and then hide it or is there another way. This is just a quick fix until we can port all the data over and fix it once and for all.
Dec 20 2004, 10:44 AM
I would just put it on the form and hide it using the visible property, especiially since it's just a temp solution. That works rather well for something like your situation and in the case where you need to show a name but still might need the ID field tied to that name.
Dec 20 2004, 11:26 AM
Thanks that just might have to do but do you know how to do it just for future reference?
Dec 20 2004, 11:29 AM
If you need it and it's in the query this is the best solution. This works best because it takes no extra time to return the fields since they are part of the form's source. If it's not in the query you could return it via a recordset.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here