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

Updating a field in a MS access table with month(birthdate)

P: 2
I have create a query to update the month from the birthdate field

Expand|Select|Wrap|Line Numbers
  1. DoCmd.RunSQL "UPDATE usrStaff SET usrStaff.[Birth Month] = Month([usrStaff]![BirthDate]);"

Two problems occur

firstly I want the update confirmation to not appear


where do you put the code (currently in a subform) to ensure that it actual update the filed and row you are working in
Mar 2 '07 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 10K+
P: 12,366
1) DoCmd.SetWarnings True/False will turn off and on the warnings.

2) If that subform is bound to the table, there is no need to use a DoCmd.RunSQL.

3) Having a Birthdate field and Month of Birth field is redundant and you should drop one of them.
Mar 2 '07 #2

P: 2
Thank you set warnings works great
Mar 12 '07 #3

Expert Mod 10K+
P: 12,366
Not a problem. What about the other issue?
Mar 12 '07 #4

Post your reply

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