A
Antonio
David, it still displays the first record.
Thanks, Antonio
-------------------------------------
Antonio,
Why not have frmTroubleTicket as a sub-form of whatever
form CompanyName is
on (presumably OpenTTs). Maybe on a tab control.
If you must do it by opening a new form, here's an (Access
2000) example
that shows how to open the form with a where condition. Be
very careful how
many commas and quotation marks you use and where you put
them.
DoCmd.OpenForm "frmTroubleTicket", , ,"[YourTableName].
[CompanyName] = " &
"""" & Me.CompanyName & """"David Straker
..
Thanks, Antonio
-------------------------------------
Antonio,
Why not have frmTroubleTicket as a sub-form of whatever
form CompanyName is
on (presumably OpenTTs). Maybe on a tab control.
If you must do it by opening a new form, here's an (Access
2000) example
that shows how to open the form with a where condition. Be
very careful how
many commas and quotation marks you use and where you put
them.
DoCmd.OpenForm "frmTroubleTicket", , ,"[YourTableName].
[CompanyName] = " &
"""" & Me.CompanyName & """"David Straker
Antonio said:hello, all....I am trying to call another record from a
form to another form. This is what I have, but when I
double-click on the company name it doesn't show the
record for that customer, but it shows the first record in
the other form. Any help will be appreciated. Thanks
Private Sub CompanyName_DblClick(Cancel As Integer)
DoCmd.OpenForm "frmTroubleTicket", _
Wherecondition:="CompanyName = """ & Me.CompanyName
& """"
DoCmd.Close acForm, "OpenTTs"
End Sub
..