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!

Using VB to fill in blank cells in table

Status
Not open for further replies.

bjc1007

Programmer
Jul 3, 2002
5
US
Is there a way to use VB (or anything) to fill in blank cells in a table? I have a table with several fields that have many blank rows. I want to put N/A or such in the blank cells, but I'd rather not do it manually. How would I reference the tables and the fields (and any blank cells) with VB?
 
Is this a one-time thing? If so, why don't you just create one or more Update queries to insert the 'n/a' value where the target field criteria is 'IsNull' (or whatever your parameters are going to be). You could accomplish the same thing thru a Sql statement using a recordset but if it may not be worth it. If I am off base perhaps you could explain in more detail exactly what you want to do.
 
Hi bj,

Cheap, cheerful 'n quick.

New query -> Design View -> Select the table (click ADD) -> Close the table Popup form.
On the menu, click the 'overlapping forms' icon 'down arrow' and select 'Update Query'.

This adds a row to the query called 'Update to'.

Select all fields that you want changing to 'N/A' (just double-click - em').

In each 'Update To' field type: 'N/A'.

Run the query.

ATB Darrylle "Never argue with an idiot, he'll bring you down to his level - then beat you with experience."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top