Query to Form?

RichGags

Registered User.
Local time
Today, 15:09
Joined
Jun 30, 2003
Messages
39
I have an unbound box on one form which is populated by a query. I would like to then doubleclick the row with the persons name and quote number and have thier record in another form open. Im having trouble with the syntax.

I assume it should be something like this:

Private Sub List6_DblClick(Cancel As Integer)
DoCmd.OpenForm "Quotes", *something which says open form based on their quote number that I double clicked*
DoCmd.CloseForm "Quotes QueryForm"
End Sub


Thanks!
 
Last edited:
Im almost there, its working now, this is what Ive got, but it wont close the original form. Is something wrong with my close syntax or should I do it a different way?

Private Sub List6_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "QUOTES"
stLinkCriteria = "[QUOTE_#]=" & Me.List6.Column(0)
DoCmd.OpenForm stDocName, acNormal, , stLinkCriteria, acFormEdit, acWindowNormal
DoCmd. Close , "Quotes Query"
End Sub
 
DoCmd.Close acForm, Me.Name
 

Users who are viewing this thread

Back
Top Bottom