RE: VBA Syntex Question
- From: Mr B <MrB@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 14 Mar 2007 12:57:12 -0700
With out being able to see the data and the structure of the database or the
queries that you refer to, it is really difficult to determine what the
problems are.
I sounds to me as if there are problems with the criteria in you queries
that provide the data to the report.
You did not say, but are you exporting the Report to Word or is there
another query that is used to do the export?
One thing that I would point out: You state, "it seems to me that the
solution is to replace the word "None" with a null value, such as a blank
space". Please be aware that there is a huge difference between a blank
character in a string (" "), an empty string value ("") and Null. Also be
aware that Access (sql) really knows the difference so you need to pay
peticular attention to how you refer to these values. This could be having
effect on your problems.
Although I seriously doubt that the fix for your issue is really centered
around the use of the word "None" in the field, ff replacing the "None" with
a blank space is really what you want to do, then VBA is not required to do
that.
You can simply use an update query and have it update the field with "None"
for all records to " ".
--
HTH
Mr B
draccess at askdoctoraccess.com
"thebiggermac via AccessMonster.com" wrote:
My company inherited a database that has numerous blank data fields. In order.
to make the project work correctly the blank field(s) was populated with the
word "None". This had the desired effect and the project screamed along
nicely.
Now the powers that be want the word "None" replaced with a blank. The
problem is that removing the word causes the project to fail. By failure I
mean when running the query(s) it skips data (the blank fields) which in turn
produces erroneous reports (a lot of data is missing). In Access we are
getting around the issue with conditional text formatting (Access 2003, we
literally white out the text). BUT the data is exported to Word. When that
happens the word "None" appears in the Word doc.
The missing data (what we populated with the word "None") is generally
located in one specific field (about 98% of the time), which is why it seems
to me that the solution is to replace the word "None" with a null value, such
as a blank space. I know this can be done via VBA. Most likely the code would
be in a module and available as Public to the entire database to affect the
odd fields where data is also missing. I'm almost positive a Private_sub
won't work (but I could be wrong). It may be that I have to create both. I’m
not sure.
We first tried to correct the issue using queries but with no luck. Hence I
believe that our only option is VBA code. The trouble is I don't have enough
knowledge of VBA to write the code to replace "None" with a null value (blank
space). Any help and/or suggestions would be most appreciative. Other
suggestions would also be appreciated.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-gettingstarted/200703/1
- Follow-Ups:
- RE: VBA Syntex Question
- From: thebiggermac via AccessMonster.com
- RE: VBA Syntex Question
- References:
- VBA Syntex Question
- From: thebiggermac via AccessMonster.com
- VBA Syntex Question
- Prev by Date: Please help with query
- Next by Date: MSDE question
- Previous by thread: VBA Syntex Question
- Next by thread: RE: VBA Syntex Question
- Index(es):
Relevant Pages
|