472,791 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

disappearing controls on form

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
2 3987
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: notalent | last post by:
I'm having a problem with a very basic program. I'm creating a app in Visual Studio (2003) C# to zip up a collection of specified files & directories and save them to a certain location. I have...
4
by: Steve | last post by:
Hi All, I've seen many postings regarding different situations where controls disappear but have never seen a decent solution. Here is the problem. I have a form onto which I am placing some...
2
by: Rachel Suddeth | last post by:
Here is my scenario: I have a few custom controls that I set up on a form and tested setting properties and appearances. Then I added a couple references to the project which add classes I need to...
6
by: Jim | last post by:
I have a user control that I am dynamically loading into an aspx page. When I fill out the text boxes and submit the form using a command button on the aspx page I lose the value from the user...
7
by: Mike Bulava | last post by:
I have created a base form that I plan to use throughout my application let call the form form1. I have Built the project then add another form that inherits from form1, I add a few panel controls...
6
by: Suzanne | last post by:
Hi all, I really hope someone out there can help me as I've been tearing my hair out on this one for a good while and I'm getting really frustrated now! My problem is this - my custom...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
6
by: George Yefchak | last post by:
Hi folks, What's the latest news on the "disappearing controls" issue? I've seen a few posts over the last several months indicating that other people have the same problem, but I've seen...
1
by: JDeats | last post by:
I have many labels that are disappearing from my form when the user resizes it, they seem to dissapear when certain width/height thresholds are exceeded. I have no code in place purposely trying...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.