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! 2 4091
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!
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********@com cast.net> wrote in message news:<c6******* *************@c omcast.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! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 a checkedListBox that holds all the directories and files that I
want saved. I have two buttons (One for selecting file & one for
directory) that are hooked to a openFileDialog and folderBrowserDialog.
When a new file or dir is selected, it...
|
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
standard controls from the toolbox (mainly radio buttons and labels.)
The form itself derives from a base Form which derives from
System.Windows.Forms.UserControl. I do this as the base form has a
|
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
get data from the server to actually do something useful. (These are
generated by 3rd party database software.)
After adding those references, and no other changes to my form.... all the
controls disappear from the visual interface on the...
|
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 control. I have an Error-checking
function in the user control that I invoke from the aspx page. This method
fires and detects an error even though I fill the the text box with text.
Now, if I fill out the text box again with text everything goes...
|
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 each with a couple of
controls in them I then rebuilt my project and my new panels and all
controls they contained are gone... I've looked through the Auto generated
code but don't see anything that looks wrong Any body have any idea why
this...
| |
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 controls periodically disappear from my
project when I build it. First of I get the message about a missing
dependency, then if I rebuild after that - the control just physically
disappears from the form, and I get an object not found error when I
|
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 good while and I'm getting really
frustrated now!
My problem is this - my custom controls periodically disappear from my
|
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 nothing about a solution. Surely their ought to
be a patch by now!
Just to review, the problem is that at seemingly random intervals, a form
will open in design view in VB.net 2003 with some controls missing.
(Sometimes just one, and sometimes LOTS...
|
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 to alter these controls on
maximize, minimize or form resize so whatever is causing this is
default behavior. The settings on the labels that are disappearing are
all default settings with the exception of Font, which is set to
Vernanda 8.25pt...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |