Please forgive my ignorance on this subject - I am relatively new to MS Access and appreciate any advice.
I am developing a database to record student data.
One of the fields in the table is named LTSCHOOL and data entry is via a combo linked to a table called 'LN20 - School last attended'. 'LN20 - School last attended' consists of two fields, Code and Description.
The LTSCHOOL combo stores the school Code in the table as the Description (school name) is not required.
I have created an unbound textbox called txtLTSCHOOL in which I want the Description to appear based on the Code in the 'School last attended' textbox.
I have used the following VBA code on the AfterUpdate event on the combobox:
txtLTSCHOOL = DLookup("[description]", "LN20 - School last attended", "
I am developing a database to record student data.
One of the fields in the table is named LTSCHOOL and data entry is via a combo linked to a table called 'LN20 - School last attended'. 'LN20 - School last attended' consists of two fields, Code and Description.
The LTSCHOOL combo stores the school Code in the table as the Description (school name) is not required.
I have created an unbound textbox called txtLTSCHOOL in which I want the Description to appear based on the Code in the 'School last attended' textbox.
I have used the following VBA code on the AfterUpdate event on the combobox:
txtLTSCHOOL = DLookup("[description]", "LN20 - School last attended", "
Code:
=Form![LTSCHOOL]")
This does give me the Description of the school as per the Code but does not change when I move through the records. The Code does change however as this is bound to the table.
Can someone tell me how I can have a unique Description for each record instead of the same Description throughout?
Many thanks