Discussion Locked

Access:Have 1field autofill another?

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
My form has 6 fields and all but 1, have data input via ten-key pad. Is it possible to have one field entry auto fill another (e.g. "MainDTCode"=24 "Code"=Set) without requiring alpha key entry or a "List Box"?

7 replies

by saratogapete

Sure you can!
If you use the AfterUpdate event on any of your text box controls you can put a macro or VBA code there to do what you want. FOr example, if they type "MainDTCode" in TextBox 1, you could have code like:
If me.textbox1 = "MainDTCode" then
me.OtherTExtBox = 24
endif
THat's a very simple example but that's the gist of it.

I hope this helps.
Peter

by jpadilla

Pointed me in the right direction :0)
As my code writing skills are minimal, I will re-post in hopes of acquiring specific code for my situation.

by jpadilla

Pointed me in the right direction :0)
As my code writing skills are minimal, I will re-post in hopes of acquiring specific code for my situation.

by jpadilla

FieldName "MainDTCode" is set for DATA TYPE=text and limits the input range (1-999). I am currently utilizing 1-165 of the range.
Each one the those entries requires a corresponding "Code," limited to only: MTN,PRO,OTH,SET and RAW.
Will this require a macro or VBA code unique for each possiblity?

by jpadilla

FieldName "MainDTCode" is set for DATA TYPE=text and limits the input range (1-999). I am currently utilizing 1-165 of the range.
Each one the those entries requires a corresponding "Code," limited to only: MTN,PRO,OTH,SET and RAW.
Will this require a macro or VBA code unique for each possiblity?

This discussion is closed to new replies.