Results 1 to 4 of 4

Thread: Subform help

  1. #1
    Join Date
    Oct 2002
    Posts
    2

    Lightbulb Unanswered: Subform help

    Here is the scenerio... I have a switchboard that allows you to add support calls or view all support calls. When you click the add call button it brings up the form 'supportcallentry' where a new call is logged and saved. When you click the view all calls button it brings up a form with a subform on that form containing all the support calls in the support call table. Is there a way that when a user double clicks on a row within that subform it will bring up that specific record in the 'supportcallentry' form for editing? I just need the user to be able to select the record they wish to edit and double click on it to bring it up into another form that I specify. How would I do this? I've tried some code and cannot accomplish it. Please help if you can. Thanks.

  2. #2
    Join Date
    Feb 2002
    Posts
    403
    In the onclick event of the subform add some code like:

    Msgbox CallID

    Then test and check that when you click different rows you are getting the different callID numbers.

    Create a form to edit the records, and replace the above with Docmd.Open..., passing in the CallID as the openArgs property.

    For more help on openArgs refer to Help.

  3. #3
    Join Date
    Oct 2002
    Posts
    2
    Originally posted by dynamictiger
    In the onclick event of the subform add some code like:

    Msgbox CallID

    Then test and check that when you click different rows you are getting the different callID numbers.

    Create a form to edit the records, and replace the above with Docmd.Open..., passing in the CallID as the openArgs property.

    For more help on openArgs refer to Help.


    I dont quite understand how to get the callid set. When I just leave it like the above it returns nothing. I just cannot figure how to double click on a row and then it bring that rows values up into another form. Thanks

  4. #4
    Join Date
    Feb 2002
    Posts
    403
    Try pasting this into the subform VBA Code

    Private Sub Form_Click()
    'Send the ID from the subform to a msgbox

    MsgBox Me.CallID

    End Sub


    The above assumes callID is the ID field you wish to obtain.

    Once this is pasted in, then go back to design view and tell the form properties there is a procedure in the OnClick event.

    This will demonstrate what I am talking about

Posting Permissions

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