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

link record to form

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


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

P: n/a
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********@hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.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 discussion thread is closed

Replies have been disabled for this discussion.