Taking a parameter from recordsource of form to open a new form in ms access vba.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HiGu
    New Member
    • Feb 2012
    • 99

    Taking a parameter from recordsource of form to open a new form in ms access vba.

    I have a procedure that opens a form based on a particular "A_ID".This A_ID is present in the recordsource of a subform but it's not displayed on the same.How do I refer to this A_ID so as to open the form?
    As of now A_ID used to come from a combobox which had A_ID in its select query.
    Code:
    forms![frmMain]![cboID]
    Now, I do not know how do I take A_ID from the subform as it is not displayed in any of the controls.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32653

    #2
    See if the fields are available (The RecordSource of a bound form has fields). If not, then you may need to include a hidden control bound to that field for this purpose.

    Comment

    Working...