By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,761 Members | 1,878 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,761 IT Pros & Developers. It's quick & easy.

Changing all data in a field

P: 8
Can anyone help me with this.

I have recently taken over as a Membership Secretary of a local sports club. I have a current database that is very old and needs alot of work. Instead of trying to develop the current database I am re buildin it from scratch.

With membership running yearly, once a year i need to change all of the members status.

I have a field in a table that refers to a persons membership status. This is oly allowed to be Member, Non-Member and Pending.

I need some coding that will (when a command button is clicked) change everyones status from whatever it is to "Non-Member" to save me going down the list changing everyone manually (Takes some time with hundreds of members).

Before anyone asks, I need to keep non-members on the database for some time after there membership ends and also new members are classed as pending due to insurance reasons.

Can anyone help???
Jan 6 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 378
This can be done with an Update query. Here's two walkthroughs for them:

Make a backup copy of your database and test your query on it until you're satisfied with the results.

Then if you need to call it from a command button on a form somewhere, make an OnClick event for the button, and use the following:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdGlobalMembershipReset_Click()
  2.     DoCmd.OpenQuery "ResetQuery"
  3. End Sub
Replace ResetQuery with whatever it's name is.
Jan 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.