I am pretty competent with 'normal' database development but am not competent with Visual Basic!
I have a form (Ledger) with a sub-form (Sub-ledger) where I enter details of money received for a charity and then (in the sub-ledger) the allocation of the gift to a number of Missions. The fields in the sub-form are Sub-Ledger Number, Ledger Number, Amount, Society, Full Name (Exc Prefix) and Instructions.
When a code is entered in the Society field and the tab key is pressed the following field 'Full Name (exc Prefix)' is populated from an existing table. The focus moves directly to the Instructions field. I want to highlight a situation where a code is entered which does not have an existing record in the table in my database. I was trying, unsuccessfully, to use VB in the Instructions field (On Got Focus) to throw up a message drawing attention to the error and then run an existing query which would list the details for all existing Societies. I tried to get the code to interrupt the entering of data where the 'Full Name (Exc Prefix)' was null but my VB skills are not up to it!! The source of the information in the sub-form (described above) is a query called 'Link Sub-Ledger to Mission Names' so I want a message box to open followed by the Table containing all the Missions details (called Missions). If the field is not null I want to be able to continue entering data in the Instructions field.
Can someone please help me with this?