Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / April 2005

Tip: Looking for answers? Try searching our database.

link record to form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John - 28 Apr 2005 15:09 GMT
I have 1 table:  tbl_main
primary key is a field called JobNo

1 query:  qry_main   (this simply has all fields and just places the JobNo
field in ascending order).

I have 2 forms
frm_main
frm_bldInfo

I have created the main form where by the user simply presses a macro button
to open up the frm_bldInfo.
But when the frm_bldInfo opens, it does not open with the relevant
information for the record selected in the main form. The frm_bldInfo simply
shows the first record info in the database and not the relevant record
chosen initially in the main form.
Both the forms have their source as the qry_main.

Should I create a second table that has the bldinfo on its own then simply
create a query linking the two tables with the JobNo field ?
thanks for any help.
xangelbaby@hotmail.com - 28 Apr 2005 18:38 GMT
Hi John,

You need to put some criteria in the "Where Condition" box for your
macro that opens the form. Let's say you have a field called id that is
the primary key and the text box on the form that is bound to the id is
called txtID. Then you could put [id]=Forms![frm_bldInfo]![txtID] in
the Where box.

Miriam
Jo K. - 30 Apr 2005 17:22 GMT
this is still not working. I keep getting the message:
Enter parameter value:   Forms![frm_bldInfo]![JobNo]

Just to clarify what I have set up:
-Primary key is field called   JobNo
-query called   qry_main
-form called    frm_main  (whose source is qry_main)
-macro button in   frm_main   opens a form called   frm_bldInfo
this form contains (source:  qry_main).
I have placed the following expression in the Where condition of the
"OpenForm" action in the macro.       [JobNo]=[Forms]![frm_bldInfo]![JobNo]
Note: the name of the text box in the frm_bldInfo is the bounded JobNo
field.
Both the forms have the JobNo field. Hence JobNo is used twice in the Where
condition. Is this right?

> Hi John,
>
[quoted text clipped - 5 lines]
>
> Miriam
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.