A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Automatically open a pop up form based on info from another form



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2004, 05:27 PM
Deb Struble
external usenet poster
 
Posts: n/a
Default 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  
Old September 17th, 2004, 07:32 PM
Deb Struble
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 12:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.