473,406 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

linking two forms

I have what is probably a simple fix for the gurus. I have one form
that has several products listed and I want to double-click onto the
field to bring up a more detailed product form of the chosen product. I
have "ProdNum" as a field on both forms. How can I link the forms?
Thanks in advance!!
Dav

Sep 21 '06 #1
4 6450

"Parasyke" <kr************@yahoo.comwrote in message
news:11**********************@d34g2000cwd.googlegr oups.com...
>I have what is probably a simple fix for the gurus. I have one form
that has several products listed and I want to double-click onto the
field to bring up a more detailed product form of the chosen product. I
have "ProdNum" as a field on both forms. How can I link the forms?
Thanks in advance!!
Check Help for DoCmd.OpenForm... the WhereCondition or Filter arguments are
likely to be how you limit the Records displayed on the Form you are
opening. That's not the only way, but it is probably the simplest.

Larry Linson
Microsoft Access MVP
Sep 21 '06 #2
Parasyke wrote:
I have what is probably a simple fix for the gurus. I have one form
that has several products listed and I want to double-click onto the
field to bring up a more detailed product form of the chosen product. I
have "ProdNum" as a field on both forms. How can I link the forms?
Thanks in advance!!
Dav
Look at the OpenForm arguments

Docmd.OpenForm "ProdFormSingle",,,"Prodnum = " & Me.ProdNum
Sep 21 '06 #3
Sorry, I'm struggling with syntax... here is my code:
I must clarify that my main form is a simulated dataview (i.e. form
view with continuous rows of records. What I want to do is double-click
on the asset number field which will (and does) open another form that
displays more asset details for that item. My form opens but I don't
understand how to 1) get the respective record displayed in the second
form and 2) when I double-click another line (record) on my first form
it will refresh the second form with the respective details of that
record. Let me know of any more or better details I can provide...
Thanks!!

_______________________________________________
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

Exit_Asset_Number_Click:
Exit Sub
Err_Asset_Number_Click:
MsgBox Err.Description
Resume Exit_Asset_Number_ClickEnd Sub
_____________________________________________
Look at the OpenForm arguments

Docmd.OpenForm "ProdFormSingle",,,"Prodnum = " & Me.ProdNum
salad wrote:
Parasyke wrote:
I have what is probably a simple fix for the gurus. I have one form
that has several products listed and I want to double-click onto the
field to bring up a more detailed product form of the chosen product. I
have "ProdNum" as a field on both forms. How can I link the forms?
Thanks in advance!!
Dav
Look at the OpenForm arguments

Docmd.OpenForm "ProdFormSingle",,,"Prodnum = " & Me.ProdNum
Sep 21 '06 #4
Salad just gave you the code to do what you want -- no "syntax" difficulty.
Place that code in the DoubleClick event of the Control containing the
ProdNum, and replace Me.ProdNum in Salad's code with the name of the Control
displaying ProdNum on the first Form you describe (which, for clarity,
should not be the same as the Field to which it is bound... rename it to
txtProdNum or some other name to differentiate).

Larry Linson
Microsoft Access MVP

"Parasyke" <kr************@yahoo.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
Sorry, I'm struggling with syntax... here is my code:
I must clarify that my main form is a simulated dataview (i.e. form
view with continuous rows of records. What I want to do is double-click
on the asset number field which will (and does) open another form that
displays more asset details for that item. My form opens but I don't
understand how to 1) get the respective record displayed in the second
form and 2) when I double-click another line (record) on my first form
it will refresh the second form with the respective details of that
record. Let me know of any more or better details I can provide...
Thanks!!

_______________________________________________
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

Exit_Asset_Number_Click:
Exit Sub
Err_Asset_Number_Click:
MsgBox Err.Description
Resume Exit_Asset_Number_ClickEnd Sub
_____________________________________________
>Look at the OpenForm arguments

Docmd.OpenForm "ProdFormSingle",,,"Prodnum = " & Me.ProdNum
salad wrote:
>Parasyke wrote:
I have what is probably a simple fix for the gurus. I have one form
that has several products listed and I want to double-click onto the
field to bring up a more detailed product form of the chosen product. I
have "ProdNum" as a field on both forms. How can I link the forms?
Thanks in advance!!
Dav
Look at the OpenForm arguments

Docmd.OpenForm "ProdFormSingle",,,"Prodnum = " & Me.ProdNum

Sep 21 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
3
by: John South | last post by:
I have an Access 2000 front end that I wish to work with a SQL Server 2000 database by means of Linked tables. Do I have to use an ODBC connection to SQL Server? It seems to be the only option...
14
by: diskoduro | last post by:
Hi!! Years ago I built a database to control the production of a little factory. The users wanted to work in a Windows Net workgroup so I created an mdb with all the tables and data an after...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
2
by: Mike Boozer | last post by:
I have two subforms on my main form. I want the records on subform B to correspond with the records on subform A which they do. However, I want the records on subform A to let me know if there is a...
1
by: santociabattari | last post by:
Hi Folks, I have 3 forms I want to link, so that when I advance 1 record in one form it will update the other two with the same record in the first form. I have tried using the form wizard (I...
1
by: MJ | last post by:
I have a database where, when I put 3 forms on one form they link fine and auto fill in information as they should; however, when I try to use the Tab Control form I am having trouble having to...
2
by: danthrom | last post by:
Hi all, I am trying to hid a command button which links two forms. The forms are connected by a one-to-many relationship and the second form has details on the first. But if no details are...
3
by: Robert McEuen | last post by:
Using A2K3, Windows XP I'm handling a many-to-many relationship with a linking table structure as follows (irrelevant fields omitted): tblIssue PK_IssueID (autonumber, primary key) IssueName...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.