By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,010 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Picking up focused data from continuous form

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.