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

disappearing controls on form

P: n/a
I built a form to access a query with a 2 field primary key. It
should use 2 controls to find the unique record and display the other
field values on the form. In the criteria section of the query, I set
the 2 primary key values equal to the 2 control values on my form.
When I input a value to these 2 controls the query finds the correct
record, so I know my query with the criteria works.

My problem is trying to get the output values from this query to the
form. When I set the Record Source Property of the form to the query,
without the criteria, it will pull the first record off the query.
When I set the Record Source Property to the query, with the criteria,
the form becomes blank with all controls disappearing and the labels
for these controls disappearing. Only the Header label and background
color remain.

I thought I've done everything right, but I'm stuck and would
appreciate any help!
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The blank display you describe is what an Access form will give you when
there are no records in the recordset. For some reason the query is
returning no rows.

If the query (by itself) is valid and returning rows, then I suspect the
freshly-opened form has nulls or some such in the controls that the
query is looking at for criteria.

You probably need to set default values for those two controls, which
you do in the Properties box, Data tab. And, you may need to put the
two controls in the form header and not in the detail section, so they
will be populated with good data when the query goes looking for its
criteria.

Bruce Pick

neptune wrote:
I built a form to access a query with a 2 field primary key. It
should use 2 controls to find the unique record and display the other
field values on the form. In the criteria section of the query, I set
the 2 primary key values equal to the 2 control values on my form.
When I input a value to these 2 controls the query finds the correct
record, so I know my query with the criteria works.

My problem is trying to get the output values from this query to the
form. When I set the Record Source Property of the form to the query,
without the criteria, it will pull the first record off the query.
When I set the Record Source Property to the query, with the criteria,
the form becomes blank with all controls disappearing and the labels
for these controls disappearing. Only the Header label and background
color remain.

I thought I've done everything right, but I'm stuck and would
appreciate any help!

Nov 12 '05 #2

P: n/a
Thanks for the response, but I can't get it to work yet.

I set the 2 input controls to default values where I know a record
exists. The form was still blank. I moved the 2 controls to the
header. I could then see those controls, but my output controls in
the details section were still missing.

I tried making a 2nd form with just the output text boxes pulling from
the query(if this worked I would just use a subform). With the query
open so I can see it, when I select 2 input values on the 1st form the
query displays 1 row, the correct row. I open the 2nd form pulling
from this query, and the values displayed are not from the row I see
in the open query. Instead the value displayed is from the 1st record
of the query, had the criteria not been in place (ie. the first record
in the table this qry pulls from). Why would my control display this
value, instead of the one the query is displaying?

Bruce Pick <br********@comcast.net> wrote in message news:<c6********************@comcast.com>...
The blank display you describe is what an Access form will give you when
there are no records in the recordset. For some reason the query is
returning no rows.

If the query (by itself) is valid and returning rows, then I suspect the
freshly-opened form has nulls or some such in the controls that the
query is looking at for criteria.

You probably need to set default values for those two controls, which
you do in the Properties box, Data tab. And, you may need to put the
two controls in the form header and not in the detail section, so they
will be populated with good data when the query goes looking for its
criteria.

Bruce Pick

neptune wrote:
I built a form to access a query with a 2 field primary key. It
should use 2 controls to find the unique record and display the other
field values on the form. In the criteria section of the query, I set
the 2 primary key values equal to the 2 control values on my form.
When I input a value to these 2 controls the query finds the correct
record, so I know my query with the criteria works.

My problem is trying to get the output values from this query to the
form. When I set the Record Source Property of the form to the query,
without the criteria, it will pull the first record off the query.
When I set the Record Source Property to the query, with the criteria,
the form becomes blank with all controls disappearing and the labels
for these controls disappearing. Only the Header label and background
color remain.

I thought I've done everything right, but I'm stuck and would
appreciate any help!

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.