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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ZERO OUT VALUES IN A TABLE

Status
Not open for further replies.

rstitzel

MIS
Apr 24, 2002
286
US
I HAVE A TABLE NAMED TBL_INVENTORY. I WANT TO BE ABLE TO ZERO OUT THE ON-HAND FIELD FOR EVERY ITEM. I WANT TO GIVE THE USER THE ABILITY TO RUN THIS FROM A MENU ITEM FROM THE SWITCHBOARD. IF YOU DO A COPY/PASTE YOU HAVE THE OPTION TO COPY ONLY THE STRUCTURE AND NOT THE DATA. THAT'S WHAT I REALLY WANT TO DO. IS THERE A WAY THROUGH A MODULE/MACRO?

ANY ASSISTANCE IS APPRECIATED. THANKS
 
DoCmd.TransferDatabase [transfertype], databasetype, databasename[, objecttype], source, destination[, structureonly][, saveloginid]

For exporting:
DoCmd.TransferDatabase acExport, &quot;Microsoft Access&quot;, <destination db>, acTable, <source tblname>, <destination tblname>, True

For importing:
DoCmd.TransferDatabase acImport, &quot;Microsoft Access&quot;, <source db>, acTable, <source tblname>, <destination tblname>, True

This is good for copy/paste structure only. If you only want to 0 out a particular field, I would suggest a recordset object. You know how your tables work, though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top