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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what am I doing wrong?

Status
Not open for further replies.

christerhaard

Programmer
Joined
Oct 5, 2002
Messages
28
Location
SE
Hi Gurus,

Description

Form with two subforms the subforms are "A" and "B"
by double_click a field in "A" I want to set focus at subform "B" and search and display the same artikle that I clicked on in "A", yes they are linked to the same database.

This is what I do today, but with this I open a new form:
instead I would like to move to my subform and display the result.

Private Sub ARTIKELID_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "ARTIKLAR"

stLinkCriteria = "[ARTIKELID]=" & Me![ARTIKELID]
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub

Thanx for all your help!
 
Something like this ?
Private Sub ARTIKELID_DblClick(Cancel As Integer)
Forms![mainform]![subform B control].Form.Recordset.FindFirst "[ARTIKELID]=" & Me![ARTIKELID]
End Sub

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 

OP said:
what am I doing wrong?

How about being totally non-descriptive-of-your-issue in your thread title?

You know better than that... (hey, set a good example!)

Don

[green]Tis far easier to keep your duck in a row if you just have the one.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top