General discussion

Locked

Auto fill a access form field

By dakota99 ·
In Access 2000, I want to look in a form field and apply a value to another field in the same form based on what is entered in the first field. For example:
If field A=1
Then field B=Matt

The value of field B is not a lookup from another table.It is only dependent on what the user enters in Field A. What is the easiest way to accomplish this?

T.I.A.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Auto fill a access form field

by Karpi In reply to Auto fill a access form f ...

Hello,

in this case I would use code in the AfterUpdate-Event-Procedure of field A

example


Sub A_AfterUpdate()

Select case me.a
case 1
me.b="Matt"
case 2
me.b="..."

case else me.b="N/N"

end select

end sub

HTH
Karpi
<fluctuat nec mergitur>

Collapse -

Auto fill a access form field

by dakota99 In reply to Auto fill a access form f ...

Hi,
Thanks so much or your help. I am definitely a novice at the coding. I understand most of the example you gave. There are just 2 things I need a little clarification on.
1. What does the Me in "Me.b" stand for?
2. In the line "me.b="N/N"" what is the "N/N" mean?
Thanks Again

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums