How is the result of query placed in a unbound textbox ?
Suppose
CriteriaLookups has columns TableName, KeyColumn, KeyValue,
DataColumn
Foo,x,11,xhat
Bar,z,3,xyzzy
And
Lookup
Foo has columns x,xhat
Bar has columns z xyzzy
Foo data
....
11,123
....
Bar data
....
3,321
....
In a continuous form with .data=CriteriaL ookups, want to show
lookup(unbound) , TableName, KeyColumn, KeyValue, DataColumn
where the lookup control gets the result of the dynamic query
select ![DataColumn] from ![TableName] where ![KeyColumn]=!
[KeyValue]
form to show:
123,foo,x,11,xh at
321,bar,3,321,x yzzy
Is such a form plausible ? 3 11278
On Feb 12, 9:39 am, "Richard" <richard.goo... @devenezia.comw rote:
How is the result of query placed in a unbound textbox ?
Suppose
CriteriaLookups has columns TableName, KeyColumn, KeyValue,
DataColumn
Foo,x,11,xhat
Bar,z,3,xyzzy
And
Lookup
Foo has columns x,xhat
Bar has columns z xyzzy
Foo data
...
11,123
...
Bar data
...
3,321
...
In a continuous form with .data=CriteriaL ookups, want to show
lookup(unbound) , TableName, KeyColumn, KeyValue, DataColumn
where the lookup control gets the result of the dynamic query
select ![DataColumn] from ![TableName] where ![KeyColumn]=!
[KeyValue]
form to show:
123,foo,x,11,xh at
321,bar,3,321,x yzzy
Is such a form plausible ?
I sorry, but your description of the problem is a little foo-bar-ed.
I'll answer what I can and maybe that will help clear up what you are
trying to do.
How is the result of query placed in a unbound textbox ?
A query does not return 'a' result, it returns a set of results which
may or may not contain any information. If you want an unbound control
to display a portion of that data, you have to put it there yourself.
This usually means referencing a property of another control or
supplying the value through code. If you want the value of a combobox
or of one of it's columns, you can set the ControlSource property of
the textbox to =ComboBoxName.C olumn(x). After the user selects
something in the combobox, whatever data is in column x will be
displayed in the textbox.
On Feb 12, 10:45 pm, "storrboy" <storr...@sympa tico.cawrote:
I sorry, but your description of the problem is a little foo-bar-ed.
I'll answer what I can and maybe that will help clear up what you are
trying to do.
How is the result of query placed in a unbound textbox ?
A query does not return 'a' result, it returns a set of results which
may or may not contain any information.
Thanks Storry.
I muddled about the help file and found that setting ControlSource to
=DLookup (DataColumn, TableName, KeyColumn&"="&K eyValue)
would do it.
The help tips include:
"
- Although you can use the DLookup function to display a value from a
field in a foreign table, it may be more efficient to create a query
that contains the fields that you need from both tables and then to
base your form or report on that query.
- You can also use the Lookup Wizard to find values in a foreign
table.
"
Eventually went with a view
On Feb 13, 10:45 am, "Richard" <richard.goo... @devenezia.comw rote:
On Feb 12, 10:45 pm, "storrboy" <storr...@sympa tico.cawrote:
I sorry, but your description of the problem is a little foo-bar-ed.
I'll answer what I can and maybe that will help clear up what you are
trying to do.
How is the result of query placed in a unbound textbox ?
A query does not return 'a' result, it returns a set of results which
may or may not contain any information.
Thanks Storry.
I muddled about the help file and found that setting ControlSource to
=DLookup (DataColumn, TableName, KeyColumn&"="&K eyValue)
would do it.
The help tips include:
"
- Although you can use the DLookup function to display a value from a
field in a foreign table, it may be more efficient to create a query
that contains the fields that you need from both tables and then to
base your form or report on that query.
- You can also use the Lookup Wizard to find values in a foreign
table.
"
Eventually went with a view
That will work too, but keep in mind that the domain functions can
slow things down as the database grows.
If you've already gathered the data once in another control, it is
faster to reference it instead of reading the table(s) multiple times.
In a small database though you probably wouldn't notice much. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Pat |
last post by:
Hello,
I've used Sum() to total bound fields on a continuous form with no problem.
However, I now have a continuous form, on which I use an unbound field to
calculate the number of hours between two times stored in a record (bound
fields). This field is called txtDuration.
On my footer, I've created another unbound field named txtWeeklyTotal. I've
set the Control Source to =Sum(), but this returns a #Name?
error. I've tried . and it...
|
by: Simon P |
last post by:
Hello group, I'm in desperate need of help. Here goes :
I have the following tables : CONTACTS (ContactID, FirstName,
LastName, Company, etc.), SHOWS (ShowID, ShowDescription) and
SHOWDETAILS (links the previous tables together so not to have a
many-to-many relationship -- has the ContactID and ShowID fields).
I have a main form with a couple of listboxes which are used for
querying the CONTACTS table. The results populate bound fields...
|
by: David |
last post by:
Hi,
I need a button shown for each record (cont. form) with specific
captions on each.
I have a notes form for each record. When a user presses the button
they can read the notes. I want to display a caption on the button to
state either "Order Notes" or "READ NOTES".
I placed a label over the button, and depending if the notes field is
|
by: Steve Jorgensen |
last post by:
One thing that makes Access so useful rapid development tool is the seemless
way it links user interfaces to data storage. That is also one of its most
maddening weaknesses, since Access doesn't offer much help when you need the
UI metaphor to differ from the data storage schema in any significant way.
Here's one trick, though, that you can use to do some simple forms of
uncoupling UI behavior from the back-end structure, and still take...
|
by: Edwinah63 |
last post by:
Hi everyone,
Please let there be someone out there who can help.
I have two BOUND combo boxes on a continuous form, the second being
dependent on the first. I have no problem getting the second combo to
change depending on what values the user selects in the first box, it's
just that every time the user changes the first combobox, the second
combobox FOR EVERY RECORD goes blank.
| |
by: panwala_bhavesh |
last post by:
Thanks in advance... I have a form displaying the results of a query in
a continuous form style. I want to be able to double-click on the key
field of the form (a textbox, in this case a AssetID) and use this to
populate the AssetID textbox of another form. Any ideas on how to link
these?
Thanks!
Bhavesh
|
by: balancetotal |
last post by:
Creating a running sum in continuous form in Access 2003
--------------------------------------------------------------------------------
Hello:
I have three forms on my user-interface.
Main form is called frmPatients.
Within this main form is an embedded form called fromVisitDates.
Linked to this form is the form called fsubfrmServices.
|
by: blueheelers |
last post by:
I have been researching for several hours on the best way to display
images in continous forms in Access 2003. For example, I want to
display employee name, email, phone, and picture for each record in
the recordset. I can have the pictures converted to any usable
format, use OLE or linking, whatever needs to be done.
So far, the 3 possible solutions I have found are:
1) OLE objects - if you don't have bitmaps associated just...
|
by: RAG2007 |
last post by:
I have a subform that is set in continuous form view. My VBA code fills in specific values in unbound fields on each form in the "On Current" event. The values are dependent on other fields in the form.
The problem I run into is that, because the records are continuous and therefore all visible, when I am on one record, the unbound fields on all records are given the values of the selected form. When I subsequently select a different record,...
|
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...
|
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,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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();...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |