If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Automatically open a pop up form based on info from another form
I have a form in datasheet view that shows all the Purchase Order
Information (PO #, Item #, Supplier Name, Qty, Cost). Rather than adding all the Supplier Information (Address, Phone #, etc) to this form as well I would like the user to be able to double click on a Supplier Name and it would automatically open a pop-up window displaying all the Supplier Information (Address, Phone #, ect). Does anyone have any ideas on how I would do this? This is what I originally used but it gives me an error and it doesn't pull the correct Supplier information. Private Sub SupplierName_DblClick(Cancel As Integer) DoCmd.OpenForm "frmSupplierView2", acNormal Me.SupplierID = Forms.PObyPartView2.SupplierID End Sub Thanks in advance for any help! |
#2
|
|||
|
|||
I posted my question too soon...sorry for any inconvenience. I was reading
through more of the other posts and found my answer. This is what I did if any one is interested. Private Sub SupplierName_DblClick(Cancel As Integer) On Error GoTo Err_cmdOpenSupplierView_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmSupplierView2" stLinkCriteria = "[SupplierID]=" & "'" & Me![SupplierID] & "'" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_cmdOpenSupplierView_Click: Exit Sub Err_cmdOpenSupplierView_Click: MsgBox Err.DESCRIPTION Resume Exit_cmdOpenSupplierView_Click End Sub "Deb Struble" wrote in message ... I have a form in datasheet view that shows all the Purchase Order Information (PO #, Item #, Supplier Name, Qty, Cost). Rather than adding all the Supplier Information (Address, Phone #, etc) to this form as well I would like the user to be able to double click on a Supplier Name and it would automatically open a pop-up window displaying all the Supplier Information (Address, Phone #, ect). Does anyone have any ideas on how I would do this? This is what I originally used but it gives me an error and it doesn't pull the correct Supplier information. Private Sub SupplierName_DblClick(Cancel As Integer) DoCmd.OpenForm "frmSupplierView2", acNormal Me.SupplierID = Forms.PObyPartView2.SupplierID End Sub Thanks in advance for any help! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dlookup | miaplacidus | Using Forms | 9 | August 5th, 2004 09:16 PM |
Report Based Upon Parameter Query with Form References | Vincent DeLuca | Setting Up & Running Reports | 4 | July 19th, 2004 01:55 AM |
Need to open new form based on selection in subform | Steve | Using Forms | 0 | June 24th, 2004 05:21 PM |
surely a form with a ListBox can be used in a query? | 1.156 | Running & Setting Up Queries | 14 | June 2nd, 2004 04:54 PM |
Form Doesn't Go To New Record | Steve | New Users | 15 | May 16th, 2004 04:33 PM |