467,927 Members | 1,971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,927 developers. It's quick & easy.

Picking up focused data from continuous form

Thanks in advance... I have a form displaying the results of a query in
a continuous form style. I want to be able to double-click on the key
field of the form (a textbox, in this case a AssetID) and use this to
populate the AssetID textbox of another form. Any ideas on how to link
these?
Thanks!
Bhavesh

Oct 10 '06 #1
  • viewed: 2081
Share:
2 Replies
On 9 Oct 2006 20:12:24 -0700, pa*************@yahoo.com wrote:

In Form1.AssetID.DoubleClick, write:
Form_Form2.AssetID = Me.AssetID

-Tom.

>Thanks in advance... I have a form displaying the results of a query in
a continuous form style. I want to be able to double-click on the key
field of the form (a textbox, in this case a AssetID) and use this to
populate the AssetID textbox of another form. Any ideas on how to link
these?
Thanks!
Bhavesh
Oct 10 '06 #2
Thanks! This worked very well. On another RELATED issue I have
another form displaying the results of a query in a continuous form
style (name of form: AssetA). I want to be able to double-click on the
key field of the form (a textbox) and use this to populate several
boxes textbox of another form (named: Asset Details1). Any ideas on how
to link
these? The form: Asset Details1 is an unbound form, not bound to any
query or table. When I double click on the textbox in form AssetA, form
Asset Details1 appears, but unpopulated and after this message: "Cannot
find the form AssetA refered to in the code".

Here is my code.... there may be a better way since in essence all the
data in both forms is found in the same query.
__________________________________________________ _____________
Private Sub Asset_Number_DblClick(Cancel As Integer)
On Error GoTo Err_Asset_Number_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Asset Details1"

DoCmd.OpenForm stDocName, , , stLinkCriteria

Forms!AssetA![Asset Number] = Forms![Asset Details1].[Text142]
Forms!AssetA![Serial Number] = Forms![Asset Details1].[Text170]
Forms!AssetA![Location] = Forms![Asset Details1].[Text150]
Forms!AssetA![Sub-Location] = Forms![Asset Details1].[Text162]
Forms!AssetA![Model/Part Number] = Forms![Asset Details1].[Text168]
Forms!AssetA![Description] = Forms![Asset Details1].[Text146]
Forms!AssetA![Misc Description] = Forms![Asset Details1].[Text144]

Exit_Asset_Number_Click:
Exit Sub
Err_Asset_Number_Click:
MsgBox Err.Description
Resume Exit_Asset_Number_Click
End Sub
__________________________________________________ ____________

Tom van Stiphout wrote:
On 9 Oct 2006 20:12:24 -0700, pa*************@yahoo.com wrote:

In Form1.AssetID.DoubleClick, write:
Form_Form2.AssetID = Me.AssetID

-Tom.

Thanks in advance... I have a form displaying the results of a query in
a continuous form style. I want to be able to double-click on the key
field of the form (a textbox, in this case a AssetID) and use this to
populate the AssetID textbox of another form. Any ideas on how to link
these?
Thanks!
Bhavesh
Oct 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Prakash Wadhwani | last post: by
11 posts views Thread by Doug Bell | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.