By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,509 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,509 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

secondly

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


Rabbit
Expert Mod 10K+
P: 12,316
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

Rabbit
Expert Mod 10K+
P: 12,316
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.