473,771 Members | 2,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Lookups

21 New Member
I have a table ADDRESSPOINTS with fields ADDRESS, X and Y.
This contains thousands of existing records of addresses and their associated X and Y mapping coordinates.
I have a table INCIDENTRECORDS with fields INCNUMBER and NAME.
I want to be able to create records in the table INCIDENTRECORDS via a form INCFORM by selecting from the appropriate pre-listed addresses and then entering data in the fields INCNUMBER AND NAME.
I then want a query GISDATA to contain fields ADDRESS, X, Y, INCNUMBER and NAME.
This will then be used to link across and automatically display the locations of the incidents within a GIS mapping system.
I can cope with the GIS bit - but any help in how to set up the internal Access database lookups would be gratefully received!
Thanks.
Kev
Feb 13 '09 #1
6 1377
beacon
579 Contributor
How do you want to lookup the info? Do you want to use a form to open a query or a report?

Are you also saying that you want a combobox on the data entry form that will show the user all the available addresses they can choose from?
Feb 13 '09 #2
KEV999
21 New Member
Hi, thanks for the prompt response.
I've managed to get the addresses to show up in a combo box within the form.
By starting to type in the address it matches them and lets you choose the one you want. That bit is fine.
Where I'm stuck is getting the info from the table where the addresses are into the query along with the rest of the data entered.
Feb 13 '09 #3
beacon
579 Contributor
What is the recordsource for your form?

If you make the recordsource of the form the same as the query that you want the results to go to...and then make the control source on each of the controls on your form (textbox, combo, etc.) equal to the query as well, you should be able to do the data entry without any problems.

Does that make sense? I hope this doesn't come across as condescending.. .wanted to start basic in case you aren't that familiar with Access.
Feb 13 '09 #4
KEV999
21 New Member
Many thanks. Please be as condescending as you wish - I'm very new to Access! Could you even explain how to do this a little more simply.......!
Feb 13 '09 #5
beacon
579 Contributor
Haha...I always feel like it's important to say that so I don't make cyber enemies.

I then want a query GISDATA to contain fields ADDRESS, X, Y, INCNUMBER and NAME.
First off, have you created the the above query? If not, do that first.

Open your form in design view. Right click somewhere on the form and choose Properties. In the dropdown box at the top of the Properties dialog box, select Form. Amongst the properties listed for the form, look for RecordSource... what does it say? If it doesn't have GISDATA in it, select it from the RecordSource list. (RecordSource is where your form is supposed to link to. Essentially it's the location you want your data to go to.)

Then click on each of the controls on your form (excluding labels) and make sure there is a ControlSource. (The ControlSource is the specific place in the RecordSource where you want the data entered in the control to go to. For instance, if you have a text box for a date without a control source, it won't get put on any table. It's like writing without any paper or playing air guitar...your work doesn't do anything)

Once you've done that, the data should enter on your query, considering the relationships between your tables is well-defined.

Let me know if there's anything else I've failed to address.
Feb 13 '09 #6
NeoPa
32,573 Recognized Expert Moderator MVP
I don't see anywhere in your data layout anything which will allow you to associate an address with an incident.

What you normally see in situations such as these is a field in what is essentially your lookup table (ADDRESSPOINTS) which can act as a Primary Index, and a similar field in your data table (INCIDENTRECORD S) which acts as a Foreign Index. This way, your query can link the two tables together such that any record in [INCIDENTRECORDS] matches up with only the one matching record in [ADDRESSPOINTS].
Feb 13 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4446
by: Marc | last post by:
I'm back in the Access development mode and seem to have forgotten how to do 2 things that should be simple. I have a database with a table of contacts, companies and activities. The idea is that I'll put in a list of companies, a bunch of contacts that work at each company, and an activities form that allows me to input every activity I do for each contact. The activities table includes a lookup field (also named contactID) for...
1
1212
by: Colin | last post by:
Question#1: Many of my forms have combo boxes (e.g. CustomerID). The combo box looks up CustomerName from CustomerID in the Customer table. Am I better off including CustomerName in my query (which the form depends on)and have the combo box based on CustomerName or is it better to limit the query fields by using just CustomerID? I'm guessing that keeping queries to a minimum will impact the speed in which queries take place. Questions#2
5
1504
by: Don Sealer | last post by:
I'm beginning to understand a little about lookups, but just a little. Here's another question I'm wondering about. I want to input a part# and then input a department code (G,D,B) and depending on the department code have Access find the corresponding file to lookup. In other words I could have a scenario like this Part# Department# lookup File 123456 G C:\File1 123456 D ...
1
1462
by: Russell | last post by:
Hi, I've been reading a lot about not using lookups in tables lately. Thus far, what I've been able to understand from my reading is this: - Do not use lookup fields in tables because they hide what's really stored (e.g. 'Joe Bloggs' is displayed, '4' is stored as the ID) - Instead, use combo boxes on forms, taking their values from tables or queries.
5
4951
by: AnAnimal | last post by:
We are moving a rather large application to the VB.NET platform. This application has a ton of table lookups. ie. code & description or code, category & description or code, class, category & description Most of the users know the more common codes and will just enter them but occasionally will need to look these codes up (especially when a temp is using the system!!). How would the VB.NET veterans handle this?
24
2692
by: BBands | last post by:
I have some CDs and have been archiving them on a PC. I wrote a Python script that spans the archive and returns a list of its contents: ...]. I wanted to add a search function to locate all the versions of a particular song. This is harder than you might think. For example the Cajun "national anthem" is Jolie Blond, but it can be spelled several different ways jolie, joli, blon, blond, etc... In addition the various online services that...
6
5420
by: mac | last post by:
Summary: 1. I want to define a column in anMS Access table to be lookups on other tables. 2. The table that is the data source (e.g the "parent" table) has a composite primary key. 3. When the "child" table does the lookup, it should pass all the columns necessary to properly restrict the data returned to the litbso for he lookup. 4. How do I accomplish this in a lookup?
7
3008
by: | last post by:
I have what's probably a simple page lifecycle question related to dynamically evaluating values that are placed by a repeater and dynmically placing user controls that use those values. I'm attempting to bind a user control I've written, "ImageBox", to a repeater. The user control takes a custom property, "ContentID", that will execute a database lookup and load an image.
2
2903
by: King Ron | last post by:
Ola all. In responding to a recent post requesting help with a search issue, I recommended using a combo box lookup in the table design. "paii, Ron" (no relation) posted this reply: " There are many posts in this group explaining the pitfalls of using the lookup feature in tables. Best practice appears to be, keep the lookup in the forms using combo box or list box."
4
4386
by: netnewbie78 | last post by:
Hello All, I don't have a problem (but maybe I will after I explain). I have a question with regards to something I saw in Access 2007. But first, a little backstory: I'm writing a very small stock database. For now, it will simply track what products come in (Stocks bought by Project) and what products go out (Stocks sold to by Project) . There are three tables: Products, Transactions and Projects.
0
9619
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, 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...
0
10260
Oralloy
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...
0
10102
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 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...
1
10038
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,...
0
9910
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 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...
1
7460
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 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...
0
6712
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();...
1
4007
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
3
2850
bsmnconsultancy
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...

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.