Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Go to same record on other form.. 1

Status
Not open for further replies.

fdalmoro

IS-IT--Management
May 8, 2003
90
US
Hi,

I have a Help Desk database that I'm working on. Users currently can view their calls in a summary form that shows all of their calls in a list or a detail view that displays their call with greater detail.

What I want to do is put in code that when the user clicks on a certain call in the summary view, it will pull up that call in the detail view.

I hope this is clear, thanks for the help.
 
Create a button using the wizard that will open the form you want to the current record.
 
Is that just supposed to be the Open Form function on the wizard? I can only get that to open a form, not specify which record to be at.
 
In Access 97 and above, there is 2 options. 1) open a form, 2) to open a form to a specfic record. The second option it the one to choose, but you have to have a feild in both tables that has the same data.
 
I have Access 2000, but it doesn't seem to have this in the wizard, or the help menu, that I can find. There is no option for opening a form to a specific record. Guess I got the diminutive version... :)
 
I'm not at work today so I can't play around with it but I'll let you know tomorrow if I find something with that wizard.

Thx
 
I found it in the wizard. You have to click on;

-Form Operations/Open form

-Select the Form to open which in my case would be the Detail view of the call.

-Select "Open the Form find Specify Data to display"

-Click on the ID's from both tables and click the <->

-then whatever picture and whatever name

Done..

I later took the code from this button that was created and put it into the double click action of all of the row. Now a user can double click on any part of the row and get the details. I removed the button.

Thanks for the help.
 
I go to Form Operations, Open Form and then select the form I want. Once I click next (or double click on the form name), then the next option is to type the name or select the picture. Grr. This is exactly what I need (especially the coding for a double click action) and yet the wizard doesn't have it. There have been a few other times when the wizard couldn't open, or wasn't available, so I'm thinking I need to reinstall it. Grr again.

Actually, though...Can you get the code from your program? I plan on putting it into the doubleclick event for rows anyway, so just changing form names shouldn't be a biggie...

Thanks in advance for if you still have access to the code, and if you're willing to share :)

and if not, then thanks for walking me through what I'm at least SUPPOSED to have...
 
That's not a problem. Here is the code that the wizard makes:

Code:
Private Sub COMPLETION_DUE_DATE_DblClick(Cancel As Integer)
On Error GoTo Err_COMPLETION_DUE_DATE_DblClick

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = &quot;WO_HELPDESK&quot;
    
    stLinkCriteria = &quot;[WO_NUMBER]=&quot; & Me![WO_NUMBER]
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_COMPLETION_DUE_DATE_DblClick:
    Exit Sub

Err_COMPLETION_DUE_DATE_DblClick:
    MsgBox Err.DESCRIPTION
    Resume Exit_COMPLETION_DUE_DATE_DblClick
    
End Sub

I should have thought of sharing the code. If you need help figuring out what goes where let me know.

Hope this helps.
 
Oh that's beautiful! Thank you so much.

And I should be able to make a button that goes to the next record still IN the detail view. Yay!

Thanks again! I should star you 10 times for this.
 
Hi BoxBox, You mention a dblclick event for a row, Can you pls tell me is there a properties dialogue with the events for a row? Or must it be done programmatically?
Tks.
 
Hmm..I'm not sure how you have yours set up, but mine is a form with a subform. The subform is going to either be a datasheet, or continuous forms set up to look like a datasheet.

I don't think there is a property sheet for the rows, per say, but when I look at the subform in design view, I can click in the white, ruler looking area to the left of my &quot;row&quot;, which selects everything to the right. Then I can go to the DblClick event for this &quot;Multiple selection&quot; and add the code to that. Alternatively, you could add the code to the DblClick event for each control in the row.

Does that make sense?
 
Hi Mr Box, Thanks for your reply. I've tried without joy on a subform and continuous form. I can select the row in the way you described and get a property sheet for &quot;Multiple Selections&quot;, I can see the dblclick property and can choose code builder, BUT it won't take me to the VBA edit screen. Never mind will probably have to make each control in the row double clickable. Tks again.
 
Sorry about that--I knew you could select them but I didn't think to even try to put code in that way. At least you could copy paste through each control, and it's fairly quick to go select controls inside of VB...I hope you don't have too many items in the row!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top