J
jo_notintheknow
Guest
Hi,
I'm having difficulties deciding the best way of using VBA for the following problem;
I'm looking to use VBA to loop through a table to select any fields that contain the value -1 (which stands for a missing value in this table). I need to be able to run the code so that it runs through about 20 fields that could possibly contain this value and then report back on which records have -1 and in which particular fields!
I've been trying little snippets of code but I can only seem to get it working one field at a time. The added complication is that I don't want this code attached to a form as there's already quite a few records currently in the database, I was thinking along the lines of a simple printed report instead.
Any ideas or should I stop trying to do it using loops? I have checked other fields using If...else statements to produce different messages depending on whether there is data in the field and then run this through a query which I can then use as a report.
Sorry if this seems a really daft problem!
Thanks!
I'm having difficulties deciding the best way of using VBA for the following problem;
I'm looking to use VBA to loop through a table to select any fields that contain the value -1 (which stands for a missing value in this table). I need to be able to run the code so that it runs through about 20 fields that could possibly contain this value and then report back on which records have -1 and in which particular fields!
I've been trying little snippets of code but I can only seem to get it working one field at a time. The added complication is that I don't want this code attached to a form as there's already quite a few records currently in the database, I was thinking along the lines of a simple printed report instead.
Any ideas or should I stop trying to do it using loops? I have checked other fields using If...else statements to produce different messages depending on whether there is data in the field and then run this through a query which I can then use as a report.
Sorry if this seems a really daft problem!
Thanks!