Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012

    Unanswered: Open selected record to a new form (revisited)

    Access 2003:
    In looking through the forum I have found a thread that seems to address my issue but I must be missing something in the syntax.

    I have a continuous form listing multiple values from an existing query. My employer wants to be able to click on the "Last" (last name) value in the continuous form and have the entire contact record for that contact open in an existing (ViewContact) form.
    Similarly, they want to be able to click on the "Vehicle" value and have that entire record open in an existing (Vehicle) form.

    So, I have to connect whatever I do to the various values (or do i connect it to the controls for the values) rather than to the continuous form as a whole.

    My VBA is very limited. I have tried variations on the syntax shown (DoCmd.OpenForm "ViewContactForm", , , "ID = " & Me.ID & "'") in the exiting thread but have had no luck. Using the above syntax I get an "invalid outside procedure" error.

    I have combed the forum and found several possible solutions, but so far, no joy. Any help is greatly appreciated.
    Last edited by Rayce; 03-20-12 at 23:31. Reason: missing text

  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    Presumably this is the technique you're looking for:

    Open a second form to the record

    And here's where to put the code:

    First VBA

    It sounds like you don't have it within a specific event's code.

  3. #3
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    Quote Originally Posted by pbaldy View Post

    ...It sounds like you don't have it within a specific event's code.
    And since you wouldn't really want it in the OnClick event of the LastName or Vehicles Controls, as users may want to 'click' into the Controls while doing data entry, the usual candidate for this kind of thing would be the DoubleClick event for those Controls.

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts