473,498 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Referencing data in a field within another field

Hello folks,

Let me first apologize for any impropper terminology I may use as I am
presently trying to broaden my Office knowledge by diving into Access
head on.

My specific problem is this. I have a field in one of my tables that
references a value in another table via a list box. Next to it, instead
of manually creating another list box to go along with it, I would like
to have this other field acknowledge that the value in it's neighbor is
from "Table A, Column 2 Record 1" and display "Table A, Column 1,
Record 1".

Ultimately, I would like to create a Form to have users enter data
into, and this dropdown box represents data that all users should know.
The field I wish to autofill would be with data that further describes
the item selected from the list, but most users will not know this
info. I've tried digging through some form of expressions for this, but
to no avail, and being an absolute newbie in practice with this
application, I am not sure of my direction to resolve this quagmire
(use queries, expressions in data view, etc).

Any and all help is appreciated, and I will be more than glad to shoot
out more specifics if needed.

-Jon

Nov 13 '05 #1
2 2402
"Rooksarii" wrote
My specific problem is this. I have a field in one of my tables that
references a value in another table via a list box. Next to it, instead
of manually creating another list box to go along with it, I would like
to have this other field acknowledge that the value in it's neighbor is
from "Table A, Column 2 Record 1" and display "Table A, Column 1,
Record 1".
There is no inbuilt ability of quite this kind. For end-users who just work
from the Datasheet view of Tables, a Lookup field is a way of referring to a
value in another Table. However, I do not advise using that, except in that
very narrow situation. It obscures what is actually stored in the Field (the
foreign key to the other table, but you see the value from the other table),
and just from watching posts in the newsgroup, causes more problems than it
solves.

If you really mean by the example you want a "record number", that is not a
part of relational databases. By definition, records in a relational Table
are _unordered_. If you want them displayed in a particular order, you need
to use a Query with a Sort Field(s) specified, or the corresponding SQL
statement with ORDER BY clause, or the Sorting and Grouping Properties of a
Report.
Ultimately, I would like to create a
Form to have users enter data
into, and this dropdown box repre-
sents data that all users should know.
The field I wish to autofill would be
with data that further describes
the item selected from the list, but
most users will not know this
info.


If I understand what you want, you can accomplish this by using a Combo or
List Box with multiple Fields in the Row Source, and displaying the
"readable" data, but having available the key or internal data in additional
Fields.

I'm certain that there are examples of this in the Northwind.MDB example
database that comes with Access. There is also an excellent resource,
temporarily housed at http://www.mvps.org/access/downloads/bapp2000.exe that
has exellent help on things like using Combo and List Boxes. It is
originally from Microsoft, and is called the "Developer Solutions" database.
It uses Northwind for many of its examples.

Larry Linson
Microsoft Access MVP

Nov 13 '05 #2
Thank you so much Larry!

Any and all resources will prove invaluable to me. Hopefully the long
term goal of all this is to get as comfortable with Access as I am with
Excel (not a guru in any terms, but I can get what I need done and find
what I need 99% of the time).

Basically what I have is users entering information off documents, and
one of the bits of info is a department number. The users will easily
be able to enter that into the form, but little if any of them will
know the name of the department that goes with the each number. If they
selected the departnemt number from the list, I was imagining the field
(so tempted to say cell, but will refrain) for department name auto
filling the the information based off the department number selected.
Ultimately it is not the most dire of issues, but when presented with a
problem, I always like to attempt to find a solution!

Many thanks again!

-Jon

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4707
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a main form with a continuous subform. On the main form I have a text box that references a field on the subform. What I'd like it to do is show the value...
3
1936
by: Lyners | last post by:
I have a table within a cell of a datagrid. I am doing updates without postback to the server using Javascript. I have everything working, except referencing a table within the datagrid cell. ...
1
1616
by: Neil | last post by:
Is it possible to reference the dataset of a sqldatasource from code? I've looked at the properties for the sqldatasource but don't see anything obvious. In particular, I have a bit field in the...
9
7350
by: Alan | last post by:
Hmmm, I'm not too good with the syntax of referencing a subreport. I have frmInvoice which has the invoice details (e.g. ProductCode, ProductCost etc) in the subform frmInvoiceDetails. I'm trying...
1
2347
by: Tim F | last post by:
Problem: I'm receiving the error "File or assembly name XXXXX or one of its dependencies, was not found." when trying to execute code in an assmebly that has both a strong-name and has been...
9
5718
by: RMC | last post by:
Hello, I'm looking for a way to parse/format a memo field within a report. The Access 2000 database (application) has an equipment table that holds a memo field. Within the report, the memo...
11
3492
by: ozTinker | last post by:
I'm sure this shouldn't be too difficult, but I lack familiarity with the MS object model. Suppose I have a table "Purchase_Orders" and a form "TEMP" which I am using to look up a customer's...
1
2827
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
3
1872
topher23
by: topher23 | last post by:
I'm trying to use a WebBrowser control to automate data entry from our local Access system to the web-based corporate ERP system. Unfortunately, I've run into a snag. Several of the text boxes that...
0
7126
marktang
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,...
0
7210
jinu1996
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...
1
6891
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...
0
7381
tracyyun
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...
0
5465
agi2029
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,...
1
4916
isladogs
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...
0
4595
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...
0
3096
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...
0
3087
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.