i have two buttons on a form. one button imports an excel spreadsheet, and one button auto categorizes the data that came into Access 2003 from the import. what i want to do is say if the auto categorize button was pressed, gray it out and when the import button is clicked, un gray it out. i was thinking of adding a field to a table and call it a flag field, but im not sure.
no need for a flag, unless i misunderstand your post.
in your click event for the autocategorize button, just buttonName.Enabled=False
in the click event for your import button, buttonName.Enabled = True
yeah. misunderstanding. let me back up a bit.
my first button (Import) imports an American Express bill into Access. from there i have a button (AutoCategorize) that automatically inputs data into the bill table based on another table. the problem is, if someone presses this button twice, it overwrites some user inputted data. so i want to be able to stop the user from clicking the AutoCategorize button again. so here is an example.
I import the bill for December. next, i press the AutoCategorize button and it does its things. i want to then have that button be disabled. when the next month comes around and i click the import button, i want the AutoCategorize button to be re-enabled so that the user can auto categorize again. and then immediately disable it again. does this make more sense?
sorry for not responding sooner. our company was robbed and i lost my computer... so i can make a field in a table with a simple 0 in it correct? so if i use your code, how do i tell access to change the 0 to a 1 in the field? thats really what i need because if i dont have that, the flagfield will always be true.