473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Can I Import Information from Excel into Linked Field in Access?

Hello All,

I have a table (Commissions) in Access that has a field (ClientName) that is linked to a "ClientName" field in a "Clients" table. The relationship was made via the LookUp Wizard.

I would like to be able to import spreadhseets of data into the "Commissions" table, however I am seeing an issue every time I attempt it. The spreadsheet in excel matches the field title names for the table exactly, however when I import the spreadhseet it deletes the data in the ClientName field. The ClientName in the spreadsheet matches exactly character for character what is listed in the Clients table, but it still deletes the data from that column.

I tried turning off the "Limit to List" for that specific field in the Commissions table, but I received an error message stating that "The first visible column, which is determined by the ComlumnWidths property, isn't equal to the bound column." Not too sure what they're referring to here.

Additionally I tried replacing the names in the ClientName field of the excel spreadhseet with the Clients.ClientName's ID. This seemed to work, but isn't very helpful to me as we would have to replace each client name with the ID before importing it.

Has anyone had this issue before or know of any possible solutions? Any help would be greatly appreciated!

PS. The primary key in the Clients table is ClientName, not the ID number. Again thank you for any help you can provide!!
Oct 27 '11 #1
3 1343
NeoPa
32,556 Expert Mod 16PB
This is very confusing. Your explanation contains references that clearly apply to a control of either ComboBox or ListBox type, yet nowhere is such a control introduced or explained.

I will add, at this time, that using a free-form string field as a PK is not a good policy. The idea of an ID for the [Clients] table is a very much better one.
Oct 27 '11 #2
My apologies for the shoddy explanation... I'll try again a different way.

Table 1: Clients
Field 1: ID [AutoNumber]
Field 2: ClientName (Primary Key)

Table 2: Commissions
Field 1: ID [AutoNumber](Primary Key)
Field 2: Client Name (in relationship with Clients.ClientName so that the field has a dropdown box with each ClientName available)

When I import the data from excel into the Commissions table, the data in the ClientName field gets deleted. Everything else imports correctly. Is it something to do with how the relationship is formatted? (enforce referential integrity and cascade update related fields are both enabled) The names in the excel spreadsheet match exactly what is listed on the Clients.ClientName field.

I think it has to do with the fact that the Commissions.ClientName field is formatted as a number due to the relationship the lookup wizard created, but cannot be sure.
Oct 27 '11 #3
NeoPa
32,556 Expert Mod 16PB
Are you saying that the number stored in Commissions.ClientName is lost?

How can a number be said to be lost for a record that is just being imported (as in how can anything have existed anywhere before if it's just being created)?

I find your explanation very confusing. It seems even now, much of the relevant information is still missing. So much so that understanding what's going on is impossible (As none of the possible scenarios I can think of fit your explanation).

I suspect that your basic setup (which I commented on in my earlier post) is somehow related to the lack of sense involved. Having an AutoNumber field which isn't a PK makes no sense and using a text field for a PK is poor strategy. Having a number field called [ClientName] is just asking for trouble. It's no wonder an explanation of such a scenario is going to be hard to make sense of.
Oct 28 '11 #4

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

Similar topics

3
by: Jon Ole Hedne | last post by:
My Access 2002-application need to work with tables from both Oracle and Access. To solve this, I want to run some querys on three views in Oracle and import the results into temporary...
1
by: Fred | last post by:
Hi. How do I import while mapping an excel table to an access table please??? I've searched around and all I can find is a software product or code that does the same thing as the access...
1
by: jquest | last post by:
Hi; I have a database that keeps track of customers and work done for them. Some customers are repeat customers many times over, ie more than 100 records for them. I keep track of them in the...
2
by: nutthatch | last post by:
I want to be able to import an Excel spreadsheet into Access 2K using the macro command Transferspreadsheet. However, the file I am importing (over which I have no control) contains some records...
6
by: jalmar | last post by:
Hello again: My second question is: I am linking an excel spreadsheet into Access, I have it linked and at first had problems getting the information imported into Access-it wasn't importing-I...
1
rcollins
by: rcollins | last post by:
So I did the searching for someone to already have the answer. I had modified this code for My spreadsheets and database. I have marked the three lines in the code that are bad. Am I missing...
3
by: theodorej | last post by:
......how do I select multiple Excel files to import into Access? Any insights would be deeply appreciated.
1
by: DThreadgill | last post by:
I have a spreadsheet with about 35 tabs that I need to import into one table in Access. I found this link http://www.thescripts.com/forum/thread650662-import+multiple+tabs.html and changed some...
6
by: provor | last post by:
Hello, I have the following code that I am using when a user presses a button to import an excel file into a table. The code is hard coded to point to the correct table. This works great for this...
1
jbt007
by: jbt007 | last post by:
Hi All, I am using the following code to import a spreadsheet into my Access 2003 tblWeekly table: DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "tblweekly", strOutFile, True,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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
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...

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.