Fields In Table Created With Relationship / Lookup Data Type
Jul 17, 2014
I created a table in MS Access using a Lookup & Relationship data-type. This means that my record cells call upon a particular table for values. It creates a LIST of values for that cell.When I query a particular value in this table I get every possible combination of the value. My query and code are below:
OR,
SELECT MainT.Content.Value, MainT.Source, MainT.[Entities Impacted].Value, MainT.Update,
MainT.[Divisions Impacted].Value, MainT.Announced, MainT.Effective, MainT.Stakeholders.Value,
MainT.[Ref#ID], MainT.[Issuing Agencies].Value
FROM MainT
WHERE (((MainT.Content.Value) Like "*" & [Forms]![SearchF]![ContentCB] & "*" Or (MainT.Content.Value) Is Null)
[Code] .....
This means that if I query STATES: "California", I'll get back every possible combination that exists with the name California in that particular field.The issue with this is that I'll get MULTIPLE primary key values rather than just 1. So, if one record, under STATES has California in it, but the other fields in that record have the Lookup & Relationship data-type, then every possible combination of that record will query instead of the multiple field-values form that you'll see in the table I am querying.
notice that my primary key (REF#ID) is repeated numerous times! This obviously causes problems with generating records and forms concerning information for 1 particular primary key. Is there a way around this problem other than specifying search criteria down as much as possible?! Perhaps there is some SQL code.
Heres something I dont understand about the lookup wizard:
Ive done a lookup wizard on one of my fields, so that now the user gets a drop down list of options to choose from:
0;1;2;3;4;5;6;7;8;"NTSC";"PAL"
Ive also set "Limit to list" to yes, so that these are the only options the user can enter.
However, it will still let me change and play around with the data type settings under the general tab. I dont understand why it lets me do this. I can set the lookup to the above list, and then specify a date type of type "date", and it will allow me to do it.
Why is this the case? Which datatype should I set it to, if I have a list of values like the one above?
I am wandering if anyone can help me here. I have a form which is linked to a table called tbl_File. Within in this form & tbl_File there is a field called Country_Code. In the Country_Code field the user places a number that corresponds to their country they want.
Now Country_Code & the corresponding country is defined in a seperate table called tbl_CountryCodes.
What I would like to do is in my form once the user has inputed a number in the Country_Code field (it will be a combo box), a label or textbox in the SAME form will then do a search of the corresponding Country name in tbl_CountryCodes and then display it to the user.
I want to create a Web App in Access 2013 that contains a table of client names, addresses etc, and a second table that contains order details, including client name. It would be nice to ensure that as someone adds a new order they are give a drop down menu containing existing client names, and I can see how you can do this for a brand new table using the lookup data type. But I already have an Excel spread sheet containing client names. If I import this into my Access web app to create the client table, and import the existing orders to create the order table, I then try and change the data type of the client name (in the order table) from short text to lookup, it won't let me!! (If I create an empty client table from scratch, it lets me define the company name as a lookup data type - but I can't then import from Excel into this empty table)
Anybody able to help me with this. I think there should be a simple solution to it, but it eludes me at the moment. Basically, I have created a form in MsAccess with alot of vb script on it, but now I realise that I have to add more fields to the source table. If I insert a new unbound text box onto the form, how do i bind it to the new field in the source table. is there a formula that I should use? When I look at the dropdown in the control source property, it only gives me the fields that were in existense at the time the form was created?
I am creating an access database for recording calls and follow ups for a company
relevant tables mst_customers card_call
ID from customers and customer_id from card_call have a one to many with all records of card_call
Although its more elaborate than this, lets get down to the problem
I created a form with a subform that should basically allow selection of customer and based on this, the creation of records in card_call as per customer selected. form and subform are linked by customer_id
Everything is working except a peculiar issue where if i select a customer_id it shows all relevant records + an additional record (usually 1 or 2) that just changes the customer_id for that record.
Example
customer_ID = 2 (combobox bound to column1 and showing name/column2)
output call_ID | Customer_ID 1 | 2 2 | 2 3| 2
changing customer_id to 4 will change to 1 | 4 (new) |
So after finishing my database with mail merges I found out that I identified a few fields as number fields but these fields may contain numbers that start with 0 and I need to preserve that.
I believe the right step is to make those fields text fields. This preserves my 0 for me but gives me other problems. My question is if that is the only way to retain the lead 0 in the data?
If it is then my problem then becomes a mail merge problem.
I am mail merging to a specific form and need the data to fit into specific boxes but I am unable to format the text with a switch. I can format the data when it is a number by using /# ### ## ####. This works just fine for me but I am unable to format it when it is text with a switch. I basically need to put spaces in between the text fields so i can make it fit so instead of 012345678, I need it look like 0 1 2 3 4 5 6 7 8 9 in the word document. I cant seem to fins anything on formatting text switches for spacing.
I imported a big table from excel with many columns. Access when I brought it in determined that they should be "text" format. I don't want to sit and change each field to a "number-double". Is there a way to quickly change data type for multiple fields at once?
What is the best way to do this without losing data? I have several FK that I made the mistake of setting up as lookup fields. I now want to correct this without losing data if possible.
DataType currently says "Number" under each of these. So I can't just change them to number. Is there another way to do this?
I have a database consisting of three linked tables, with ID as unique identifier (primary key).
I would have expected the data type for my unique identifier, especially in the main table, to be Autonumber. However, I discovered with some surprise that the primary key (ID) in
Table 1 (Main table) is data type: number, field size: double
whereas in table 2 and table 3 the ID is data type: autonumber (field size: long integer)
It must have happend "SOMEHOW" when I divided the original single table.
Is this as it should be? Or could it lead to trouble later on?
If not as should be, is there anything I can do right now to rectify the situation with risking upsetting the relationships and all?
What precautions should I take, apart from taking a backup?
I have a table "Product" and in this table I have two fields "StoragePlaceID1" and "StoragePlaceID2". Both these fields link to the look-up table "StoragePlace"
*Attached Image "Product_StoragePlace" from the Access Relationship Window"*
When I want to add a new Product from my inter face i get the error you can see in the Attached Image "Save_Error".I think the problem is that the Relationship is defined as One-to-Many,there a way to define the relationship as Zero-to-Many.
I am developing a database for a school and I have a form for staff addresses where the city is a drop down box that auto fills the state and zip according to the data in the lkuptblCity. All is working fine EXCEPT we have an Address 1 and Address 2 field for the employees.
I have two separate fields in the Staff table to store the data, as needed for reports. I have two separate fields on the form but they will not work due to pulling from the same table.
Hey guys- I have a db where I'm not sure what kind of relationship I need to establish between the tables. I have a db that manages real estate properties and realtor information. Each record can have 3 separate Realtors represented (or, as little as 1 realtor). Each Realtor has their own office, or, might have the same office as the other realtors. So, one record can have anywhere from 1 to 3 Realtors associated with it.
I have a Property Table (holds all the info on the property as well as the Realtor's unique alphnumerica ID Code).
I have a Realtor Table (holds all the contact info for the Realtor, as well as their unique alphanumeric Office Code)
And I have a Realtor Office Table (holds the contact info of the Realtor's Office).
In the Properties table- I have 3 fields for the 3 separate Realtor's ID Codes (like an employee number). Let's call it Agent1Code, Agent2Code, and Agent3Code. There won't always be an Agent2 and Agent 3 in the data- but sometimes there is.
How do I set this up and establish the proper relationships?
I know experienced DB developers say never to use a lookup in a table for a foreign key and instead to use it on the form level. For this reason, I am going through my tables and removing lookups from the table level now.
But how do y'all feel about lookup value lists? (so the list is typed-in instead of looking up a table value)
If you think they shouldn't be used then what should I do instead? Should I make a table for the handful of values and link with a FK field?
Or is there a better way? I would rather not have to make a million tables for these short, stable value lists.
I have a table with a field with names set to text data type and i want to change it to number data type but when i do it in design view the data get lost. I want to know if there is a way to convert the data in the field as number type and keep the data in the field.
I need to get x and y coordinates for each device, but the data has to get looked up from 2 other tables.
I have a table (called InstReclosers) that has device names. Each device is on a Section. I can go to another table (called InstSections) and look up what Node that particular section is tied to. Then I need to go to another table (called Nodes) to get the X and Y location for that particular node.
How I can go about getting this X and Y data into the InstReclosers table?
...in summary, InstReclosers has device name and section name. InstSections has section name and node name. Nodes has node name and XY coords. Need XY coords for each device in InstReclosers.
I am working with Independent School Districts (ISD) in the state of Texas. The State is divided into 20 regions. Over 1000 ISDs are divided among those 20 regions. Each of the 1000+ ISDs has between 3 and several hundred individual school campuses. Each has a name, but as you would imagine, there is some duplication - not within an ISD, but between different ISDs. For instance, both Dallas ISD and San Antonio ISD may have a Lyndon B. Johnson campus.
We are an association that has members on most of the campuses.
I am using an autonumber ID as primary key on the member, campus, and ISD tables.
During entry/editing within the member table using the basic datasheet, I want to use a lookup field (showing campus names) to select the campus. That is not a problem by itself. But with many tens of thousands of potential campuses to choose from that doesn't work very well. What I would like to do is restrict the campus lookup to the names within the ISD, that is, filter the lookup by ISD.
However, I don't want to include the ISD in the member records because that will not be full normalization, but I am willing to do so if necessary. But if I do, I want to include only the ISD number (another autonumber primary key for the ISD table). So during member entry, I want to translate the ISD key into the related ISD name for selecting the correct ISD, before I try to select the correct campus within the ISD.
Essentially what I want to do, is member entry thru a datasheet and first look up the ISD to find it by name, then use that selection to filter the lookup on campus to limit the selections to only campus names within the chosen ISD.
I would be grateful for any assistance with this. I am not married to this approach, so if someone has a better but different idea, please suggest it. However, I am a relative novice, so bear that in mind.
One lists all the stock symbols and company names = SYMBOL The second table lists the purchase information for each stock = PURCHASE
I then created many queries, etc. using this data. Symbol is the key link between the various tables, queries, etc.
NOW that I understand the lookup wizard in the data type, I would like to change the symbol field in the purchase table to a Lookup field. I, of course, receive a message. I am told to delete the relationship with the other tables. If I remove the relationships and change the data type, can I then replace the relationship with out damaging all the queries and forms?
I am creating a one to many relationship with the tblEmployee EmployeeID and tblWorkHistory EmployeeID because one Employee can have many past jobs
where I run in a cloud is that in access under the edit relationship dialog window it has an button called JOIN TYPE when I click on that button it open the Join Properties dialog window and presents me with three options
1. Only include rows where the joined fields from both tables are equal
2. Include all recoreds from the 'tblEmployee' and only those records from 'tblWorkHistory' where the joined fields are equal
3. Include all records from 'tblWorkHistory' and only those records from 'tblEmployee' where the joined fields are equal
Can someone explain what access is trying to ask me as it pertains to my example. I am new to access to a basic answer would help me with future relationship issues and a better understand of the concept
My colleague has a multiple table database and uses lookups for some fields. The simple query was to extract 3 fields and display all records from those fields. The result of the query was that the selected fields were listed first followed by all other fields which are usually not displayed.
First of all, I want to say Thank you to everyone in this forum I have been reading just about every question in each Topic and I have pick up a lot more than I tough I knew. [Thank you]! I not sure how to ask this question or better yet write it. Here is my Situation I work for the NAVY as an Enlisted Personnel station in (New Orleans, LA) I have created a few databases for my workcenter and were simple enough that I managed. Now, I been task to help create a Call Center DataBase to keep track of Phone Calls and Issues the Agents(Employer received Daily) As well run other reports.
I am Including a copy of what I done so far. Can someone advise me about my Database Design? Does it makes sense? Are the Relationship seen good? my frmCustomer is based on query (qSupport) I would like to know if the form and the SubForm are set up ok where I can have the Agents input data. And one more thing on the frmMenu I have a few Text Boxes where I would like to display the total Amouth of Phone Calls received - as well the ones pending and Close? Any Criticism or Suggestion are more than welcome.
I hope my Question / Request makes sense. Thank you ....