Auto Populate Using Previous Field

Yes, tomorrow. I'm going home for the night. Sweet dreams, Bob, and thank you. Talk to you tomorrow.
Regina.
 
Ok, Bob, I'm back. I have racked my brain over and over. Thought if I slept on it...well, you know. I googled my question and everything I came up with says this should be working. I checked my properties to make sure the control source was correct and I didn't see anything that should cause limitations or restrictions, but since my experience is limited...

I completely re-did the AfterUpdate, again this morning, and still, nothing. My field is still not updating. Did you come up with anything? I decided to try this with the City fields, since I that is an easier fix, since I'm testing the data after editing the event. This is what I have::banghead:

Option Compare Database
Private Sub City_AfterUpdate()
Me.City = Me.MailCity
End Sub

Thank You,
Regina
 
The code should be:

Me.NameOfControlToBeSet = Me.NameOfFirstControlBeingUpdated
 
Bob,

You are a "Rock Star"!!! :D It works perfectly and....I can edit. Sometimes it helps to sleep on it. When you phrased it the way you did I realized I was working in the wrong field. I had it reversed. I was entering that code in the After Update of the field I wanted updated. I do have one more question, please.

Before I do this in the remaining address fields, I want to make sure that it will only affect new entries. For anything to change I would have to actually go into existing records and change the mailing address for the physical address to change, correct?

I wrote a procedure out for this. I love it!

Thank You,
Regina
 
If you only want the code to run for new records use:
Code:
If Me.NewRecord = True Then
  Me.NameOfControlToBeSet = Me.NameOfFirstControlBeingUpdated
End If
I wrote a procedure out for this. I love it!
Yes, and so easy when you know how.:)
 
Bob,

Thank you. I didn't realize this was VBA until I asked my instructor. This apparently goes beyond the scope of my class.....again, so it's not something we'll be getting in to. I have been googling this same question for 6 weeks and not one tech in the US offered your method for accomplishing my goal. It's one thing to know all about this stuff, but being able to convey what you know, so it makes sense to others, is a talent you most definitely possess. I look forward to working with you, again, Bob.

Thank You
Regina
 
Bob,

Thank you. I didn't realize this was VBA until I asked my instructor. This apparently goes beyond the scope of my class.....again, so it's not something we'll be getting in to. I have been googling this same question for 6 weeks and not one tech in the US offered your method for accomplishing my goal. It's one thing to know all about this stuff, but being able to convey what you know, so it makes sense to others, is a talent you most definitely possess. I look forward to working with you, again, Bob.

Thank You
Regina
So now you have taken your first steps in programing:eek:. Well done!!
Thank you for your kind words. They are much appreciated. However, we have a saying that goes something like, "Those who can, do. Those who can't, teach".
Anyway, I look forward to helping you in the future, if you need it and I am able to.

Wishing you and yours a very Happy Christmas.
 

Users who are viewing this thread

Back
Top Bottom