PDA

View Full Version : VBA/ACCESS



aammini
04-12-2011, 07:24 PM
HI,
I am in a delima to find out how to write a vba code effiently for a situation like this eg

I havce a table in access 2007 with the name, age, sex, address. I imports excel sheet to this table.
2, Excel sheet data may not have all the fields. Sometimes it only have one field
3 Based on the data imported, there is a condition to update the table
1, Remiove the field that are empty for each record, menaing remove the column itself. no such fields in the table anymore as its not use

2. Update the same fields where there is null values with -1

Currently there are severeal if blocks. statement for each field and update of the same field.

Any suggestion to improvise the situtation?

Thanks in advance