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

Code to autofill value in form based on combo box value in Access 2007

P: 1
Hello, I have a fairly simple database. In this dbase, there is a subform which basically holds menu values for the records. These values serve as the "notes" for each record.

OK, I find that I am typing a rather long string in many "notes" section of the subform. Rather than have to type this over and over again, I would like to automate this procedure. So I have tried to create an "Event Procedure" to accomplish this, but so far, the coding doesn't work as I would like. Here is what I have done so far:

Event Procedure = AfterUpdate

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_AfterUpdate()
  2. If NFA_Pre_Reveiw_Sent = "Foreign" Then [form.Web Review.Memo] "Per Jane Pfeiffer, NFA Compliance, no Web Reveiw needed"
  3.  
  4. End Sub
NFA_Pre_Review is the field which will have the value of "Foreign". As it stands, there are 4 values available in this combo box: " "; "Yes"; "No"; "Foreign". If Foreign is chosen, I would like "Per Jane Pfeiffer, NFA Compliance, no Web Review needed" to be placed in the subform field of memo. The form is called Web_Review and the field is called memo.

Can anyone please help me figure out why the event procedure doesn't work?

Thank you!
Jan 3 '08 #1
Share this Question
Share on Google+
1 Reply


Expert 5K+
P: 8,434
I believe you'll find much more info on this in the Access forum, so I'm going to move it over there.

In the meantime, is it possible that you need to "do your thing" in the BeforeUpdate event rather than AfterUpdate?
Jan 4 '08 #2

Post your reply

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