Multiple Forms Data Linked to 1 Record:

gold007eye

Registered User.
Local time
Today, 08:03
Joined
May 11, 2005
Messages
260
What I have is a form with a combo box that lets a user select the Letter Type. For 1 letter in particular I want it to open up a subform(s) that holds "options" that users can click on. My question is how would I get these options / multiple options to link to 1 record that correlates with the Letter Type?
 
On the combo box AfterUpdate event, change the subform's ControlSource property to reflect the correct subform, i.e.

on AfterUpdate

select case me!ComboBoxValue
case 1
Forms!frmMainForm!subFormName.SourceObject = "Letter1"
case 2
Forms!frmMainForm!subFormName.SourceObject = "Letter2"
case 3
Forms!frmMainForm!subFormName.SourceObject = "Letter3"
etc
end select

This has the added benefit that all references in your VBA code to the subform can be Forms!frmMainForm!subFormName.form.controlname, regardless of which subform is involved, and specified in a module as opposed to the subform.
 
Thanks :) That helps
 

Users who are viewing this thread

Back
Top Bottom