R
Robert_L_Ross
Ok, these DLOOKUP's kill me every time.
I'm in a subform...when I choose a value from a drop down box, I want to
populate a few fields.
The drop down box source data is a SQL string:
"SELECT SCHOOLS.SCHOOL_CODE, SCHOOLS.SCHOOL_NAME FROM SCHOOLS; "
Basically, show the School Code and School Name from the Schools table, and
bind to the School Code.
I want a macro to run on the "On Change" event that will populate the School
Name, School Rep and School E-Mail.
I got stuck on the School Name. Here's my Macro:
Action:
SetValue
Item:
[Forms]![SCHOOL_INFORMATION]![SCHOOL_NAME]
Expression:
DLookUp("[SCHOOL_NAME]","SCHOOLS",[SCHOOL_ID]=[SCHOOLS]![SCHOOL_CODE])
The main form is calld "ApplicationMaster", the subform is called
"SCHOOL_INFORMATION"
I've tried to specify the main form and subform together in the Item field,
tried just using the field name, tried all kinds of fun stuff to the
expression and I can't get it to work.
Any ideas?
THX!
I'm in a subform...when I choose a value from a drop down box, I want to
populate a few fields.
The drop down box source data is a SQL string:
"SELECT SCHOOLS.SCHOOL_CODE, SCHOOLS.SCHOOL_NAME FROM SCHOOLS; "
Basically, show the School Code and School Name from the Schools table, and
bind to the School Code.
I want a macro to run on the "On Change" event that will populate the School
Name, School Rep and School E-Mail.
I got stuck on the School Name. Here's my Macro:
Action:
SetValue
Item:
[Forms]![SCHOOL_INFORMATION]![SCHOOL_NAME]
Expression:
DLookUp("[SCHOOL_NAME]","SCHOOLS",[SCHOOL_ID]=[SCHOOLS]![SCHOOL_CODE])
The main form is calld "ApplicationMaster", the subform is called
"SCHOOL_INFORMATION"
I've tried to specify the main form and subform together in the Item field,
tried just using the field name, tried all kinds of fun stuff to the
expression and I can't get it to work.
Any ideas?
THX!