Assigning a value from a query

  • Thread starter szag via AccessMonster.com
  • Start date
S

szag via AccessMonster.com

I have a field#1 on a form that I want populated based on what I enter on
field#2.

Field#1 and Field#2 are both in a different table. My problem is I know I can
use the Dlookup but I need to allow the user to overwrite Field#1. I was
getting an #error message in field#1 when I tried to put a dlookup formula in
the field#1 default.

Any suggestions?
 
F

fredg

I have a field#1 on a form that I want populated based on what I enter on
field#2.

Field#1 and Field#2 are both in a different table. My problem is I know I can
use the Dlookup but I need to allow the user to overwrite Field#1. I was
getting an #error message in field#1 when I tried to put a dlookup formula in
the field#1 default.

Any suggestions?

As long as the user must enter a value in [Field2] code the Field2
AfterUpdate event:
Me.[Field1] = DLookUp("etc....")

[Field1] can then be overwritten at any time.
 
S

szag via AccessMonster.com

fredg said:
I have a field#1 on a form that I want populated based on what I enter on
field#2.
[quoted text clipped - 5 lines]
Any suggestions?

As long as the user must enter a value in [Field2] code the Field2
AfterUpdate event:
Me.[Field1] = DLookUp("etc....")

[Field1] can then be overwritten at any time.


Thanks fredg! Can't believe I missed something so simple.
 
Top