473,602 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

link record to form

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.
Nov 13 '05 #1
2 1627
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

Nov 13 '05 #2
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?
<xa********@hot mail.com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
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

Nov 13 '05 #3

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

Similar topics

3
2245
by: VIJAY KUMAR | last post by:
Hi pals, I am using 2 web forms (pages). In first page, i have Datagrid control and on second page i have a hyper link control to the first page and Add value to the data grid/Database. Problem: when I click on the hyperlink on the second page, i am getting the first page with cahed data. But i didn't declare/Use code for cache data. when i
1
2172
by: Bill Strass | last post by:
I have a form showing the records of different people. I would like a photo to be displayed in the form, with each person's record. My digital photo > *.jpg type file and I change each photo to *.bmp format using SnagIt. I created an OLE type field in the table to store either the embedded photo or a link to the photo (I'll decide which method to use,
3
8470
by: Mark C | last post by:
I have a unbound form with a tab control with four tabs in an Access 97 database. On each tab I have a sub form each form on the sub forms is bound to its own table. Each table has a field that can link them all together. I have put an invisible unbound control on the master form that gets populated on open. I set the link child and link master of each sub form to the unbound control on the master form. When the form opens all the subforms...
2
9458
by: kmnotes04 | last post by:
Is it possible to link one drop-down box to another? For example, if a name is chosen from a drop-down list, can another drop-down list then automatically display the person's office as a result of the choice made in the first drop-down list? If so, how can that be done? I am working with 'Teach Yourself Microsoft Access' and I didn't see it discussed in that book (if it's even possible to do). Or would I just have to create linked tables...
2
3830
by: Mal P | last post by:
Hi there, I'm a J2EE fellow who (as usual) has been thrown in the deep end and have to learn a fair chunk of the .NET platform (VS, ADO, WebForms, C# etc) in roughly two days. I'm doing ok so far, but am wondering on a better way to do something... Basically, I have a form which has a few fields the user fills in. When submitted, the data is stored as a row in an SQL database table. Then, I have another page which lists all the rows...
26
2894
by: Mica Cooper | last post by:
Hi, I need to pass some info in a javascript submit. <a href="javascript:document.formName.submit();">Submit Form</a> Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1, x2, x3. I have no clue how to do this with a link submit. Thanks,
2
3318
by: Timbo | last post by:
Hi there, I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2. My first table is a table containing all the Tickets I got. The field ”Ticket” is simply a ticket-number. I’ve made a form in which I am to choose an existing Ticket and write a description for it pluss other things. The description to these Tickets are stored in another table called ”LogBook”. I then made a query on all of...
6
5702
by: CJONES | last post by:
I have a main form and use a combo box to open a pop up form. The combo box lists customers and only one customer requires the fields that are found on the pop up form. I can get the form to pop up however I do not know how to link the pop up form data to the main form record.
10
1839
by: susan | last post by:
Hi, Is it (in Access2003) possible yo link from a form in db1 to a form in db2? Thanks, Susan
16
5976
by: GLEberts | last post by:
Subject: Trying to open up a record in a form called "fmappointment" when clicking on a "looks like hyperlink" text box called "ContactID" I have made many instances of this in my database but in this case I am having a setup problem and getting the error "insert perameter" NOTE: when I do insert the record number in the pop up box the correct record does show What I have Text Box - "ContactID" on "Datessubform" Main Form...
0
7920
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8054
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6730
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5440
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.